diff --git a/3rdparty/SoundTouch/build.sh b/3rdparty/SoundTouch/build.sh new file mode 100644 index 0000000000..d9db6858d6 --- /dev/null +++ b/3rdparty/SoundTouch/build.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +curdir=`pwd` + +echo ----------------- +echo Building SoundTouch +echo ----------------- + +if [ $# -gt 0 ] && [ $1 = "all" ] +then + +aclocal +automake -a +autoconf +./configure +make clean +make install + +else +make $@ +fi + +if [ $? -ne 0 ] +then +exit 1 +fi + +#cp libZeroSPU2*.so* ${PCSX2PLUGINS} diff --git a/3rdparty/SoundTouch/configure.ac b/3rdparty/SoundTouch/configure.ac new file mode 100644 index 0000000000..42913005b8 --- /dev/null +++ b/3rdparty/SoundTouch/configure.ac @@ -0,0 +1,55 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.63]) +AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([BPMDetect.h]) + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_RANLIB + +dnl Check for 64bit CPU +AC_MSG_CHECKING(for a x86-64 CPU) +dnl if test "$build_os" == "target_os" +dnl then +AC_TRY_RUN([ +int main() +{ +int a = 0; +int*pa = &a; +asm(".intel_syntax\n" + "mov %%rax, %0\n" + "mov %%eax, [%%rax]\n" + ".att_syntax\n" + : : "r"(pa) : "%rax"); +return 0; +} +],cpu64=yes,cpu64=no,) +dnl else +dnl cpu64=no +dnl fi +if test "x$cpu64" == xyes +then +AC_DEFINE(__x86_64__,1,[__x86_64__]) +fi +AC_MSG_RESULT($cpu64) +AM_CONDITIONAL(X86_64, test x$cpu64 = xyes) + + +# Checks for header files. +AC_CHECK_HEADERS([limits.h memory.h stdlib.h string.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_INLINE +AC_C_RESTRICT +AC_TYPE_SIZE_T +AC_HEADER_STDBOOL + +# Checks for library functions. +AC_CHECK_FUNCS([memmove memset]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/3rdparty/SoundTouch/depcomp b/3rdparty/SoundTouch/depcomp new file mode 120000 index 0000000000..50adcba306 --- /dev/null +++ b/3rdparty/SoundTouch/depcomp @@ -0,0 +1 @@ +/usr/share/automake-1.10/depcomp \ No newline at end of file diff --git a/3rdparty/SoundTouch/install-sh b/3rdparty/SoundTouch/install-sh new file mode 120000 index 0000000000..8272958b56 --- /dev/null +++ b/3rdparty/SoundTouch/install-sh @@ -0,0 +1 @@ +/usr/share/automake-1.10/install-sh \ No newline at end of file diff --git a/3rdparty/SoundTouch/missing b/3rdparty/SoundTouch/missing new file mode 120000 index 0000000000..1f0fe88e65 --- /dev/null +++ b/3rdparty/SoundTouch/missing @@ -0,0 +1 @@ +/usr/share/automake-1.10/missing \ No newline at end of file diff --git a/plugins/zerospu2/Makefile.am b/plugins/zerospu2/Makefile.am index 0444786e0c..54d3daf5c5 100644 --- a/plugins/zerospu2/Makefile.am +++ b/plugins/zerospu2/Makefile.am @@ -22,13 +22,13 @@ EXEEXT=$(preext)@so_ext@ traplib_PROGRAMS=libZeroSPU2 libZeroSPU2_SOURCES= -libZeroSPU2_DEPENDENCIES = libZeroSPU2.a ../../3rdparty/SoundTouch/libSoundTouch.a +libZeroSPU2_DEPENDENCIES = libZeroSPU2.a libSoundTouch.a libZeroSPU2_LDFLAGS= @SHARED_LDFLAGS@ libZeroSPU2_LDFLAGS+=-Wl,-soname,@ZEROSPU2_SONAME@ -libZeroSPU2_LDADD=$(libZeroSPU2_a_OBJECTS) ../../3rdparty/SoundTouch/libSoundTouch.a +libZeroSPU2_LDADD=$(libZeroSPU2_a_OBJECTS) libSoundTouch.a libZeroSPU2_a_SOURCES = zerospu2.cpp voices.cpp zerodma.cpp libZeroSPU2_a_SOURCES += zerospu2.h reg.h misc.h libZeroSPU2_a_SOURCES += Linux/interface.c Linux/Linux.cpp Linux/Alsa.cpp Linux/OSS.cpp Linux/support.c -SUBDIRS = ../../3rdparty/SoundTouch +#SUBDIRS = ../../3rdparty/SoundTouch diff --git a/plugins/zerospu2/build.sh b/plugins/zerospu2/build.sh index 99777c1287..896ea0293b 100644 --- a/plugins/zerospu2/build.sh +++ b/plugins/zerospu2/build.sh @@ -2,10 +2,6 @@ curdir=`pwd` -echo ----------------- -echo Building ZeroSPU2 -echo ----------------- - if test "${ZEROSPU2OPTIONS+set}" != set ; then export ZEROSPU2OPTIONS="" fi @@ -13,6 +9,17 @@ fi if [ $# -gt 0 ] && [ $1 = "all" ] then +cd ../../3rdparty/SoundTouch/ +sh build.sh $@ +cd $curdir + +rm libSoundTouch.a +cp ../../3rdparty/SoundTouch/libSoundTouch.a ./ + +echo ----------------- +echo Building ZeroSPU2 +echo ----------------- + aclocal automake -a autoconf diff --git a/plugins/zerospu2/configure.ac b/plugins/zerospu2/configure.ac index 2181f81c37..c244ee488d 100644 --- a/plugins/zerospu2/configure.ac +++ b/plugins/zerospu2/configure.ac @@ -105,7 +105,6 @@ AC_CHECK_LIB(dl,main,[LIBS="$LIBS -ldl"]) AC_CHECK_LIB(asound,main,[LIBS="$LIBS -lasound"]) AC_OUTPUT([ - ../../3rdparty/SoundTouch/Makefile Makefile ])