diff configure.ac @ 744:c7fa50576c70

Initial implementation for supporting libSIDPlay2-FP (or libSIDPlay-FP, as they seem to call it.) Also removed support for the "old" libSIDPlay2 API, only supporting the "new" CVS trunk COMI API for the old libSIDPlay2. We'll see how that goes ..
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 05 Nov 2012 17:24:16 +0200
parents 99ed62858072
children 9dc5378cc806
line wrap: on
line diff
--- a/configure.ac	Mon Nov 05 15:19:21 2012 +0200
+++ b/configure.ac	Mon Nov 05 17:24:16 2012 +0200
@@ -22,8 +22,6 @@
 AH_TEMPLATE([HAVE_XMMSEXTRA], [Define if you have XMMS version 1.2.5 or later and you want XMMS-SID to support some extra features.])
 AH_TEMPLATE([HAVE_SIDPLAY1], [Define if you have and want to use libSIDPlay 1])
 AH_TEMPLATE([HAVE_SIDPLAY2], [Define if you have and want to use libSIDPlay 2])
-AH_TEMPLATE([HAVE_SIDPLAY2_COMI], [Define if you have libSIDPlay2 v2.2.x or later (or CVS version) with the new COMI API])
-AH_TEMPLATE([HAVE_SIDPLAY2_DISTORTION], [Define if you have libSIDPlay2 + reSID with Antti Lankila's distortion patches (v10 and possibly later) http://bel.fi/~alankila/c64-sw/])
 AH_TEMPLATE([HAVE_SIDPLAY2_FP], [Define if you have and want to use libSIDPlay 2-FP http://sourceforge.net/projects/sidplay-residfp/])
 AH_TEMPLATE([HAVE_THEMETUNE], [Define if you want to build code to play XMMS-SID theme SID-tune. The tune needs to be installed too, though.])
 
@@ -98,11 +96,23 @@
 	AC_DEFINE([HAVE_SIDPLAY1])
 fi
 
-XS_ARG_WITH([sidplay2], [libSIDPlay2], [XS_PATH_LIBSIDPLAY2])
+
 xs_have_sidplay2_api=""
-xs_have_distortion="no"
-if test "x$xs_have_sidplay2" = "xyes"; then
+XS_ARG_WITH([sidplay2], [libSIDPlay2], [XS_PATH_LIBSIDPLAY2])
+
+if test "x$xs_have_sidplayfp" = "xyes"; then
+	xs_have_sidplay2_api="(FP)"
+	xs_have_sidplay2_lib="yes"
 	AC_DEFINE([HAVE_SIDPLAY2])
+	AC_DEFINE([HAVE_SIDPLAY2_FP])
+	AC_DEFINE([HAVE_HARDSID_BUILDER])
+	AC_DEFINE([HAVE_RESID_BUILDER])
+
+elif test "x$xs_have_sidplay2" = "xyes"; then
+	xs_have_sidplay2_api="(normal COMI)"
+	xs_have_sidplay2_lib="yes"
+	AC_DEFINE([HAVE_SIDPLAY2])
+
 	AC_LANG_PUSH([C++])
 	
 	XS_BUILDERS_CHECK
@@ -112,55 +122,16 @@
 	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([::Iid], [sidplay/sidplay2.h],
-		[xs_have_sidplay2_api="yes"],
-		[
-		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 <sidplay/sidunknown.h>],
-		[ISidUnknown *i;])
-	], [
-		xs_have_sidplay2_api="(new COMI style API)"
-		AC_DEFINE([HAVE_SIDPLAY2_COMI], [1], [Define if using new libSIDPlay2 with COM-style API.])
-	],[
-		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
 
 
 dnl ***
 dnl *** Check if we have some emulator library available?
 dnl ***
-if test "x$xs_have_sidplay1" != "xyes" -a "x$xs_have_sidplayfp" != "xyes"; then
-	AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2-FP is required! Please read INSTALL for more information!])
+if test "x$xs_have_sidplay1" != "xyes" -a "x$xs_have_sidplay2" != "xyes" -a "x$xs_have_sidplayfp" != "xyes"; then
+	AC_MSG_ERROR([Either libSIDPlay1 or libSIDPlay2/libSIDPlay-FP is required! Please read INSTALL for more information!])
 fi
 
 
@@ -220,21 +191,8 @@
 	XMMS >= v1.2.5 extra features : $xs_have_xmmsextra
 	Song-position patch           : $xs_have_songpos
 	libSIDPlay 1 support          : $xs_have_sidplay1
-	libSIDPlay 2 support          : $xs_have_sidplay2 $xs_have_sidplay2_api
-	    With distortion patch?    : $xs_have_distortion
+	libSIDPlay 2 support          : $xs_have_sidplay2_lib $xs_have_sidplay2_api
 	    Included builders         : $xs_builders
 	XMMS-SID theme SID-tune       : $xs_have_themetune
 	Translations (i18n/nls)       : $USE_NLS
 ])
-
-if test "x$xs_have_distortion" = "xyes"; then
-	echo "***"
-	echo "*** WARNING! A version of libSIDPlay2 with Antti Lankila's distortion"
-	echo "*** patches has been detected. Due to the fast-changing nature of this"
-	echo "*** particular patch-set, it is possible that this version of XMMS-SID"
-	echo "*** may be incompatible."
-	echo "***"
-	echo "*** If you encounter any compilation problems, try a non-patched"
-	echo "*** version of libSIDPlay2+reSID."
-	echo "***"
-fi