# HG changeset patch # User Matti Hamalainen # Date 1211432632 -10800 # Node ID 5066bced51603a741ae4e50222f4f6b62a40589f # Parent 0c4e0feca4df38af92da80783d8081fd9e89c99f Fixes in distortion patch and libsidplay2 COM API detection. diff -r 0c4e0feca4df -r 5066bced5160 configure.in --- a/configure.in Thu May 22 07:32:15 2008 +0300 +++ b/configure.in Thu May 22 08:03:52 2008 +0300 @@ -104,10 +104,10 @@ 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 @@ -118,13 +118,25 @@ if test -d "$xs_sidplay2_includes"; then CPPFLAGS="$CPPFLAGS -I${xs_sidplay2_includes}" fi - AC_EGREP_HEADER([SIDIID], [sidplay/sidplay2.h], [ + AC_EGREP_HEADER([SIDIID], [sidplay/sidplay2.h], + [xs_have_sidplay2_api="yes"], + [xs_have_sidplay2_api="no"] + ) + 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="(old style API)" ]) - AC_MSG_RESULT([$xs_sidplay2_api]) + fi + AC_MSG_RESULT([$xs_have_sidplay2_api]) + + AC_LANG_POP([C++]) dnl *** Check for distortion patch AC_MSG_CHECKING([libSIDPlay2+reSID distortion patch]) @@ -134,7 +146,7 @@ ],[ xs_have_distortion="no" ]) - AC_MSG_RESULT([$xs_sidplay2_api]) + AC_MSG_RESULT([$xs_have_distortion]) CPPFLAGS="$tmp_CPPFLAGS" fi