Mercurial > audlegacy-plugins
annotate m4/sid.m4 @ 3144:de2f796d6f04
crossfade: fix preprocessor conditional compilation
author | Michal Lipski <tallica@o2.pl> |
---|---|
date | Sat, 09 May 2009 18:06:58 +0200 |
parents | 3d7282254b03 |
children |
rev | line source |
---|---|
2557
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 AC_DEFUN([AM_PATH_SIDPLAY], |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 [ |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 XS_ARG_WITH([sidplay1], [libSIDPlay1], [XS_PATH_LIBSIDPLAY1]) |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 if test "x$xs_have_sidplay1" = "xyes"; then |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 AC_DEFINE([HAVE_SIDPLAY1]) |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 fi |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 XS_ARG_WITH([sidplay2], [libSIDPlay2], [XS_PATH_LIBSIDPLAY2]) |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 if test "x$xs_have_sidplay2" = "xyes"; then |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 AC_DEFINE([HAVE_SIDPLAY2]) |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 AC_LANG_PUSH([C++]) |
2701
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
13 |
2557
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 XS_BUILDERS_CHECK |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 XS_BUILDERS_FIND([reSID], [resid-builder], [resid.h], [ReSIDBuilder]) |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
16 XS_BUILDERS_FIND([HardSID], [hardsid-builder], [hardsid.h], [HardSID]) |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
17 if test "x$xs_builders_available" = "xno"; then |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
18 AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]); |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
19 fi |
2701
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
20 |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
21 dnl *** Check for new COMI API |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
22 AC_MSG_CHECKING([libSIDPlay2 API style]) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
23 tmp_CPPFLAGS="$CPPFLAGS" |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
24 if test -d "$xs_sidplay2_includes"; then |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
25 CPPFLAGS="$CPPFLAGS -I${xs_sidplay2_includes}" |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
26 fi |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
27 AC_EGREP_HEADER([SIDIID], [sidplay/sidplay2.h], |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
28 [xs_have_sidplay2_api="yes"], |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
29 [xs_have_sidplay2_api="(old style API)"] |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
30 ) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
31 if test "x$xs_have_sidplay2_api" = "xyes"; then |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
32 AC_LINK_IFELSE([ |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
33 AC_LANG_PROGRAM( |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
34 [#include <sidplay/sidunknown.h>], |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
35 [ISidUnknown *i;]) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
36 ], [ |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
37 xs_have_sidplay2_api="(new COMI style API)" |
2703 | 38 AC_DEFINE([HAVE_SIDPLAY2_COMI], [1], [Define if using new libSIDPlay2 with COM-style API.]) |
2701
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
39 ],[ |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
40 xs_have_sidplay2_api="(broken version!)" |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
41 ]) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
42 fi |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
43 AC_MSG_RESULT([$xs_have_sidplay2_api]) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
44 |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
45 AC_LANG_POP([C++]) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
46 |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
47 dnl *** Check for distortion patch |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
48 AC_MSG_CHECKING([libSIDPlay2+reSID distortion patch]) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
49 AC_EGREP_HEADER([minimumfetresistance], [sidplay/sidtypes.h], [ |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
50 xs_have_distortion="yes" |
2703 | 51 AC_DEFINE([HAVE_SIDPLAY2_DISTORTION], [1], [Define if using libSIDPlay+reSID with Antti Lankila's distortion patches.]) |
2701
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
52 ],[ |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
53 xs_have_distortion="no" |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
54 ]) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
55 AC_MSG_RESULT([$xs_have_distortion]) |
ca2e5680b74e
Synchronize SID-plugin configure glue from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2557
diff
changeset
|
56 CPPFLAGS="$tmp_CPPFLAGS" |
2557
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
57 fi |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
58 |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
59 if test "x$xs_have_sidplay1" = "xyes" || test "x$xs_have_sidplay2" = "xyes"; then |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
60 m4_ifvaln([$1], [$1], [:]) |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
61 m4_ifvaln([$2], [else $2]) |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
62 fi |
f0c34c3b61c0
Synchronized Autoconf/m4 cleanups from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
63 ]) |