Mercurial > hg > xmms-sid
diff acinclude.m4 @ 838:ae1f6418d093
libSIDPlay2-FP backend interface is now in a separate module. Configuration
related things still pending.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 08 Nov 2012 21:24:38 +0200 |
parents | 1fe6005ed58c |
children | c6cf203be443 |
line wrap: on
line diff
--- a/acinclude.m4 Thu Nov 08 20:58:45 2012 +0200 +++ b/acinclude.m4 Thu Nov 08 21:24:38 2012 +0200 @@ -31,7 +31,10 @@ AC_LINK_IFELSE( [ AC_LANG_PROGRAM( - [#include <$5>], + [ + #include <stdio.h> + #include <$5> + ], [$6] )], [xs_$1_works="yes"], @@ -196,6 +199,7 @@ AC_LANG_PUSH([C++]) PKG_CHECK_EXISTS([libsidplayfp >= 0.3.7], [xs_pkg_sidplayfp="yes"], []) + PKG_CHECK_EXISTS([libsidplayfp >= 1.0.0], [xs_pkg_sidplayfp_v1="yes"], []) if test "x$xs_pkg_sidplayfp" = "xyes"; then AC_CACHE_VAL([xs_cv_have_sidplayfp], @@ -203,14 +207,21 @@ xs_sidplayfp_cflags=`$PKG_CONFIG --libs libsidplayfp` xs_sidplayfp_ldflags=`$PKG_CONFIG --libs libsidplayfp` - XS_TRY_LIBRARY([sidplayfp], - [$xs_sidplayfp_cxxflags -DHAVE_UNIX], [$xs_sidplayfp_ldflags], - [sidplayfp], [sidplayfp/sidplay2.h], [sidplay2 *myEngine;]) + if test "x$xs_pkg_sidplayfp_v1" = "xyes"; then + XS_TRY_LIBRARY([sidplayfp], + [$xs_sidplayfp_cxxflags -DHAVE_UNIX], [$xs_sidplayfp_ldflags], + [sidplayfp], [sidplayfp/sidplayfp.h], [sidplayfp *myEngine;]) + else + XS_TRY_LIBRARY([sidplayfp], + [$xs_sidplayfp_cxxflags -DHAVE_UNIX], [$xs_sidplayfp_ldflags], + [sidplayfp], [sidplayfp/sidplay2.h], [sidplay2 *myEngine;]) + fi if test "x$xs_sidplayfp_works" = "xyes"; then xs_cv_have_sidplayfp="xs_have_sidplayfp=yes \ xs_sidplayfp_cxxflags=\"$xs_sidplayfp_cxxflags\" \ - xs_sidplayfp_ldflags=\"$xs_sidplayfp_ldflags\"" + xs_sidplayfp_ldflags=\"$xs_sidplayfp_ldflags\" \ + xs_pkg_sidplayfp_v1=\"$xs_pkg_sidplayfp_v1\" " fi ]) fi @@ -224,10 +235,10 @@ AC_MSG_RESULT([yes]) fi - SIDPLAY2_LIBS="$xs_sidplayfp_ldflags" - SIDPLAY2_CFLAGS="$xs_sidplayfp_cxxflags" - AC_SUBST([SIDPLAY2_LIBS])dnl - AC_SUBST([SIDPLAY2_CFLAGS])dnl + SIDPLAYFP_LIBS="$xs_sidplayfp_ldflags" + SIDPLAYFP_CFLAGS="$xs_sidplayfp_cxxflags" + AC_SUBST([SIDPLAYFP_LIBS])dnl + AC_SUBST([SIDPLAYFP_CFLAGS])dnl else AC_MSG_RESULT([no]) fi @@ -247,7 +258,6 @@ PKG_CHECK_EXISTS([libsidplay2 >= 2.1.1], [xs_pkg_sidplay2="yes"], []) if test "x$xs_pkg_sidplay2" = "xyes"; then - AC_CACHE_VAL([xs_cv_have_sidplay2], [ xs_sidplay2_cflags=`$PKG_CONFIG --libs libsidplay2`