added check for STK to autoconf

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@393 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Danny McRae
2006-09-08 20:08:39 +00:00
parent f4154da68f
commit 14cc6afeec
5 changed files with 51 additions and 32 deletions

View File

@@ -1,4 +1,11 @@
2006-09-08 Danny McRae <khjklujn/at/users/dot/sourceforge/dot/net>
* configure.in:
fixed check for STK headers and library
* plugins/stk/mallets/mallets.h:
removed the meaningless index boundary limiter for m_delayRead and
m_delayWrite
* configure.in:
* plugins/Makefile.am:
* plugins/stk/Makefile.am:

View File

@@ -216,20 +216,23 @@ fi
# check for STK
AC_LANG_PUSH(C++)
AC_ARG_WITH(stk,
AS_HELP_STRING([--with-stk], [enable support for STK plugins]), [ with_stk=yes ], [ with_stk=no ])
AS_HELP_STRING([--with-stk], [enable support for STK plugins]),
[ with_stk=yes ], [ with_stk=no ])
AH_TEMPLATE(HAVE_STK_H, [Define to 1 if you have the <stk/Stk.h> header file.])
#if test "x$with_stk" = "xyes" ; then
# AC_CHECK_HEADER(stk/Stk.h, HAVE_STK_H="true")
# AC_CHECK_LIB([stk], [], HAVE_STK="true", HAVE_STK_H="")
#fi
if test "x$with_stk" = "xyes" ; then
HAVE_STK_H="true"
AC_CHECK_HEADER([stk/Stk.h], HAVE_STK_H="true")
AC_CHECK_LIB([stk], [main], HAVE_STK="true", HAVE_STK_H="",
[-ljack -lasound])
fi
if test ! -z "$HAVE_STK_H" ; then
AC_DEFINE(HAVE_STK_H)
AC_SUBST(stk_includes, [/usr/include/stk])
AC_SUBST(stk_lib, [/usr/lib])
fi
AM_CONDITIONAL(STK_SUPPORT, test ! -z "$HAVE_STK_H")
AC_LANG_POP(C++)
# check for vorbis-lib
@@ -662,27 +665,6 @@ fi
#fi
if test -z "$HAVE_SAMPLERATE_H" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
echo " ========================"
echo " ="
echo " = You don't seem to have libsamplerate installed and/or libsamplerate-"
echo " = development-package is missing. This will disable resampling with"
echo " = libsamplerate and results in worse quality! Currently LMMS will also"
echo " = crash more often, because internal sample-rate-converter has some bugs..."
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* libsamplerate for internal samplerate-conversion"
fi
if test -z "$HAVE_LADSPA_H" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
@@ -700,6 +682,38 @@ else
fi
if test -z "$HAVE_STK_H" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
echo " ========================"
echo " ="
echo " = If you want support for STK based instruments, please pass"
echo " = "
echo " = --with-stk"
echo " = "
echo " = to configure, STK support is still experimental."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* STK instrument plugins"
fi
if test -z "$HAVE_SAMPLERATE_H" ; then
echo " ========================"
echo " === LMMS - WARNING ======================================================="
echo " ========================"
echo " ="
echo " = You don't seem to have libsamplerate installed and/or libsamplerate-"
echo " = development-package is missing. This will disable resampling with"
echo " = libsamplerate and results in worse quality! Currently LMMS will also"
echo " = crash more often, because internal sample-rate-converter has some bugs..."
echo " = Consider installing the missing packages for using the full power of LMMS."
echo " ="
with_warnings="true"
else
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* libsamplerate for internal samplerate-conversion"
fi
if test "x$with_vst" = "xno" ; then

View File

@@ -1 +1 @@
SUBDIRS = mallets
SUBDIRS = mallets

View File

@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
INCLUDES = -I/usr/include/stk -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I.
INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I.
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="malletsstk"
@@ -29,6 +29,6 @@ CLEANFILES = $(MOC_FILES) ./embedded_resources.h
pkglib_LTLIBRARIES= libmalletsstk.la
libmalletsstk_la_SOURCES = mallets.cpp mallets.h
libmalletsstk_la_LDFLAGS = -L/usr/lib -lstk
libmalletsstk_la_LDFLAGS = -L@stk_lib@ -lstk
$(libmalletsstk_la_SOURCES): ./embedded_resources.h

View File

@@ -96,7 +96,6 @@ public:
StkFloat s = m_voice->tick();
m_delay[m_delayWrite] = s;
m_delayWrite++;
m_delayWrite %= 256;
return( s );
}
}
@@ -105,7 +104,6 @@ public:
{
StkFloat s = m_delay[m_delayRead];
m_delayRead++;
m_delayRead %= 256;
return( s );
}