# HG changeset patch # User Matti Hamalainen # Date 1065150782 0 # Node ID b3e17bb32b21bb52a1d802e5e0109f1241c7e697 # Parent ab522ab65c855027485eaefbef5b3d409a2d973e Re-added support for detection of song-position patch, bumped version to 0.8.0beta3 diff -r ab522ab65c85 -r b3e17bb32b21 configure.in --- a/configure.in Fri Oct 03 03:11:05 2003 +0000 +++ b/configure.in Fri Oct 03 03:13:02 2003 +0000 @@ -6,7 +6,7 @@ AC_PREREQ(2.56) dnl Initialize -AC_INIT(XMMS-SID, 0.8.0alpha0, ccr@tnsp.org) +AC_INIT(XMMS-SID, 0.8.0beta3, ccr@tnsp.org) AC_COPYRIGHT([[(C) 2002-2003 Matti 'ccr' Hämäläinen]]) AC_CONFIG_SRCDIR(src/xmms-sid.h) AM_INIT_AUTOMAKE @@ -16,6 +16,7 @@ dnl *** dnl *** Define some templates dnl *** +AH_TEMPLATE([HAVE_SONG_POSITION],[Define if you have XMMS patched with the songpos patch.]) 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_UNSIGNEDPCM],[Define if your audiodevice supports _ONLY_ UNSIGNED PCM samples, otherwise leave undefined.]) AH_TEMPLATE([HAVE_SIDPLAY1],[Define if you have and want to use libSIDPlay 1]) @@ -50,6 +51,25 @@ dnl *** +dnl *** Checks for header files, types and functions +dnl *** +AC_HEADER_STDC +AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) + +AC_HEADER_STDBOOL +AC_TYPE_SIZE_T +AC_C_CONST +AC_C_INLINE +AC_C_VOLATILE +AC_C_BIGENDIAN + +AC_FUNC_MALLOC +AC_TYPE_SIGNAL +AC_FUNC_STAT +AC_CHECK_FUNCS([memset strcasecmp strerror strrchr]) + + +dnl *** dnl *** Check some options dnl *** AC_ARG_WITH(unsigned-pcm, @@ -58,7 +78,9 @@ this option if your audio hardware does not support signed format PCM samples.], [ +if test "$withval" = yes; then AC_DEFINE(HAVE_UNSIGNEDPCM) +fi ],[]) @@ -83,7 +105,7 @@ fi fi ],[ -xs_sidplay1=yes +xs_sidplay1=xtry xs_sidplay1_library="" xs_sidplay1_includes="" ]) @@ -105,7 +127,6 @@ --with-sidplay2=PREFIX Enable SIDPlay2 with install-PREFIX], [ if test "$withval" = yes; then -xs_sidplay1=no xs_sidplay2=yes xs_sidplay2_library="" xs_sidplay2_includes="" @@ -114,13 +135,12 @@ xs_sidplay2=no else xs_sidplay2=yes - xs_sidplay1=no xs_sidplay2_includes="$withval/include" xs_sidplay2_library="$withval/lib" fi fi ],[ -xs_sidplay2=yes +xs_sidplay2=xtry xs_sidplay2_library="" xs_sidplay2_includes="" ]) @@ -136,37 +156,46 @@ dnl *** Determine if libraries are wanted and available OPT_SIDPLAY1="no" -if test "$xs_sidplay1" = yes; then -XS_PATH_LIBSIDPLAY1 +if test "$xs_sidplay1" = xtry; then + XS_PATH_LIBSIDPLAY1 + else + if test "$xs_sidplay1" = yes; then + XS_PATH_LIBSIDPLAY1 + if test "$xs_have_sidplay1" = no; then + AC_MSG_ERROR([libSIDPlay1 library and/or headers were not found!]) + fi + fi +fi if test "$xs_have_sidplay1" = yes; then -AC_DEFINE(HAVE_SIDPLAY1) -AC_SUBST(REQUIRE_LIBRARY,[libsidplay.so.1]) -OPT_SIDPLAY1="yes" -else -AC_MSG_ERROR([libSIDPlay1 library and/or headers were not found!]) + AC_DEFINE(HAVE_SIDPLAY1) + AC_SUBST(REQUIRE_LIBRARY,[libsidplay.so.1]) + OPT_SIDPLAY1="yes" fi -fi + OPT_SIDPLAY2="no" -if test "$OPT_SIDPLAY1" = no; then -if test "$xs_sidplay2" = yes; then LIBSIDPLAY2_REQUIRED_VERSION="2.1.0" -XS_PATH_LIBSIDPLAY2 +if test "$xs_sidplay2" = xtry; then + XS_PATH_LIBSIDPLAY2 + else + if test "$xs_sidplay2" = yes; then + XS_PATH_LIBSIDPLAY2 + if test "$xs_have_sidplay2" = no; then + AC_MSG_ERROR([libSIDPlay2 library and/or headers were not found!]) + fi + fi +fi if test "$xs_have_sidplay2" = yes; then -AC_DEFINE(HAVE_SIDPLAY2) -AC_SUBST(REQUIRE_LIBRARY,[libsidplay2.so.1]) -OPT_SIDPLAY2="yes" -BUILDERS_FIND -BUILDERS_FIND_RESID -BUILDERS_FIND_HARDSID -if test "$builders_available" = no; then -AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]); -fi -else -AC_MSG_ERROR([libSIDPlay2 library and/or headers were not found!]) -fi -fi + AC_DEFINE(HAVE_SIDPLAY2) + AC_SUBST(REQUIRE_LIBRARY,[libsidplay.so.2]) + OPT_SIDPLAY2="yes" + BUILDERS_FIND + BUILDERS_FIND_RESID + BUILDERS_FIND_HARDSID + if test "$builders_available" = no; then + AC_MSG_ERROR([No builder modules were found in the sidbuilders directory!]); + fi fi @@ -177,23 +206,27 @@ fi fi + dnl *** -dnl *** Checks for header files, types and functions +dnl *** Song position patch check dnl *** -AC_HEADER_STDC -AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) +AC_MSG_CHECKING([for song position patch]) +tmp_CPPFLAGS=$CPPFLAGS +if test -d "$prefix" ;then + CPPFLAGS="$CPPFLAGS -I${prefix}/include" +fi -AC_HEADER_STDBOOL -AC_TYPE_SIZE_T -AC_C_CONST -AC_C_INLINE -AC_C_VOLATILE -AC_C_BIGENDIAN +AC_EGREP_HEADER(set_song_position,xmms/plugin.h, +[ +OPT_SONGPOS="yes" +AC_DEFINE(HAVE_SONG_POSITION) +AC_MSG_RESULT([yes]) +],[ +OPT_SONGPOS="no" +AC_MSG_RESULT([no]) +]) -AC_FUNC_MALLOC -AC_TYPE_SIGNAL -AC_FUNC_STAT -AC_CHECK_FUNCS([memset strcasecmp strerror strrchr]) +CPPFLAGS=$tmp_CPPFLAGS dnl *** @@ -231,6 +264,7 @@ Installation directory : $libdir XMMS >= v1.2.5 extra features : $OPT_XMMSEXTRA + Song-position patch : $OPT_SONGPOS libSIDPlay 1 support : $OPT_SIDPLAY1 libSIDPlay 2 support : $OPT_SIDPLAY2 Included builders : $xs_builders