# HG changeset patch # User Matti Hamalainen # Date 1213322527 -10800 # Node ID ca2e5680b74ecc13d43e80953734bd9dcf2df1d0 # Parent 87c4bc8e8ec6ea3f3630b12aa1b9dd475f5f7d6a Synchronize SID-plugin configure glue from XMMS-SID. diff -r 87c4bc8e8ec6 -r ca2e5680b74e m4/sid.m4 --- a/m4/sid.m4 Fri Jun 06 15:30:41 2008 +0300 +++ b/m4/sid.m4 Fri Jun 13 05:02:07 2008 +0300 @@ -10,13 +10,50 @@ if test "x$xs_have_sidplay2" = "xyes"; then AC_DEFINE([HAVE_SIDPLAY2]) AC_LANG_PUSH([C++]) + XS_BUILDERS_CHECK XS_BUILDERS_FIND([reSID], [resid-builder], [resid.h], [ReSIDBuilder]) XS_BUILDERS_FIND([HardSID], [hardsid-builder], [hardsid.h], [HardSID]) - AC_LANG_POP([C++]) if test "x$xs_builders_available" = "xno"; then AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]); fi + + dnl *** Check for new COMI API + AC_MSG_CHECKING([libSIDPlay2 API style]) + tmp_CPPFLAGS="$CPPFLAGS" + if test -d "$xs_sidplay2_includes"; then + CPPFLAGS="$CPPFLAGS -I${xs_sidplay2_includes}" + fi + AC_EGREP_HEADER([SIDIID], [sidplay/sidplay2.h], + [xs_have_sidplay2_api="yes"], + [xs_have_sidplay2_api="(old style API)"] + ) + if test "x$xs_have_sidplay2_api" = "xyes"; then + AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [#include ], + [ISidUnknown *i;]) + ], [ + xs_have_sidplay2_api="(new COMI style API)" + AC_DEFINE([HAVE_SIDPLAY2_COMI]) + ],[ + xs_have_sidplay2_api="(broken version!)" + ]) + fi + AC_MSG_RESULT([$xs_have_sidplay2_api]) + + AC_LANG_POP([C++]) + + dnl *** Check for distortion patch + AC_MSG_CHECKING([libSIDPlay2+reSID distortion patch]) + AC_EGREP_HEADER([minimumfetresistance], [sidplay/sidtypes.h], [ + xs_have_distortion="yes" + AC_DEFINE([HAVE_SIDPLAY2_DISTORTION]) + ],[ + xs_have_distortion="no" + ]) + AC_MSG_RESULT([$xs_have_distortion]) + CPPFLAGS="$tmp_CPPFLAGS" fi if test "x$xs_have_sidplay1" = "xyes" || test "x$xs_have_sidplay2" = "xyes"; then