|
AC_INIT(configure.in) |
|
|
|
|
1 |
#------------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------------ |
2 |
# LinuxSampler's / liblinuxsampler's "official" release version: |
# LinuxSampler's / liblinuxsampler's "official" release version: |
3 |
|
|
4 |
LINUXSAMPLER_RELEASE_MAJOR=0 |
m4_define(linuxsampler_release_major, 1) |
5 |
LINUXSAMPLER_RELEASE_MINOR=3 |
m4_define(linuxsampler_release_minor, 0) |
6 |
LINUXSAMPLER_RELEASE_BUILD=3cvs |
m4_define(linuxsampler_release_build, 0.svn36) |
7 |
|
|
8 |
|
|
9 |
|
AC_INIT([linuxsampler],[linuxsampler_release_major.linuxsampler_release_minor.linuxsampler_release_build]) |
10 |
|
AC_CONFIG_SRCDIR([configure.ac]) |
11 |
|
|
12 |
#------------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------------ |
13 |
# The following is the libtool / shared library version. This doesn't have to |
# The following is the libtool / shared library version. This doesn't have to |
26 |
# 6. If any interfaces have been removed since the last public release, then set age |
# 6. If any interfaces have been removed since the last public release, then set age |
27 |
# to 0. |
# to 0. |
28 |
|
|
29 |
LIBLINUXSAMPLER_LT_CURRENT=0 |
LIBLINUXSAMPLER_LT_CURRENT=3 |
30 |
LIBLINUXSAMPLER_LT_REVISION=0 |
LIBLINUXSAMPLER_LT_REVISION=0 |
31 |
LIBLINUXSAMPLER_LT_AGE=0 |
LIBLINUXSAMPLER_LT_AGE=0 |
32 |
SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE" |
SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE" |
33 |
|
|
34 |
AM_PROG_LIBTOOL |
#------------------------------------------------------------------------------------ |
35 |
|
# the LSCP specification version this LinuSampler release complies with: |
36 |
|
|
37 |
|
LSCP_RELEASE_MAJOR=1 |
38 |
|
LSCP_RELEASE_MINOR=6 |
39 |
|
|
40 |
|
AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.]) |
41 |
|
AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.]) |
42 |
|
|
43 |
|
AC_PROG_CXX |
44 |
|
AC_LIBTOOL_WIN32_DLL |
45 |
|
AC_PROG_LIBTOOL |
46 |
|
AC_PROG_YACC |
47 |
|
|
48 |
AC_SUBST(SHLIB_VERSION_ARG) |
AC_SUBST(SHLIB_VERSION_ARG) |
49 |
AC_SUBST(SHARED_VERSION_INFO) |
AC_SUBST(SHARED_VERSION_INFO) |
50 |
|
|
51 |
AC_C_BIGENDIAN |
module=yes eval LIB_EXT=$shrext_cmds |
52 |
AC_CANONICAL_SYSTEM |
AC_SUBST(LIB_EXT) |
53 |
|
|
54 |
AC_SUBST(target) |
AC_C_BIGENDIAN |
55 |
AC_SUBST(target_alias) |
AC_CANONICAL_HOST |
|
AC_SUBST(target_cpu) |
|
|
AC_SUBST(target_os) |
|
|
AC_SUBST(target_vendor) |
|
56 |
|
|
57 |
|
PKG_PROG_PKG_CONFIG |
58 |
|
|
59 |
########################################################################### |
########################################################################### |
60 |
# General Checks |
# General Checks |
61 |
|
|
62 |
|
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) |
63 |
|
|
64 |
AC_MSG_CHECKING([whether x86 architecture]) |
AC_MSG_CHECKING([whether x86 architecture]) |
65 |
def_arch_x86=0 |
def_arch_x86=0 |
66 |
case $target_cpu in |
case $host_cpu in |
67 |
"i386" | "i486" | "i586" | "i686" | "i786") |
"i386" | "i486" | "i586" | "i686" | "i786" | "x86_64") |
68 |
echo "yes" |
echo "yes" |
69 |
def_arch_x86=1;; |
def_arch_x86=1;; |
70 |
*) |
*) |
76 |
# (only if the user did not provide one) |
# (only if the user did not provide one) |
77 |
CXX_CPU_SWITCH= |
CXX_CPU_SWITCH= |
78 |
if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then |
if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then |
79 |
if test "$def_arch_x86" = 1; then |
if test "$def_arch_x86" = 1 -a "$host_cpu" != "x86_64"; then |
80 |
CXX_CPU_SWITCH="-march=$target_cpu" |
CXX_CPU_SWITCH="-march=$host_cpu" |
81 |
elif test "$target_cpu" = "ppc"; then |
elif test "$target_cpu" = "ppc"; then |
82 |
CXX_CPU_SWITCH="-arch=$target_cpu" |
CXX_CPU_SWITCH="-arch=$host_cpu" |
83 |
fi |
fi |
84 |
fi |
fi |
85 |
AC_SUBST([CXX_CPU_SWITCH]) |
AC_SUBST([CXX_CPU_SWITCH]) |
86 |
|
|
87 |
|
mac=no |
88 |
|
linux=no |
89 |
|
case "$host" in |
90 |
|
*-*-darwin*) |
91 |
|
mac=yes |
92 |
|
;; |
93 |
|
*-*-linux*) |
94 |
|
linux=yes |
95 |
|
;; |
96 |
|
esac |
97 |
|
AM_CONDITIONAL(LINUX, test "$linux" = yes) |
98 |
|
AM_CONDITIONAL(MAC, test "$mac" = yes) |
99 |
|
|
100 |
|
# check if we're on MS Windows |
101 |
|
AC_CHECK_HEADERS( |
102 |
|
mmsystem.h, |
103 |
|
have_windows=1, |
104 |
|
have_windows=0, |
105 |
|
[#include <windef.h>] |
106 |
|
) |
107 |
|
AM_CONDITIONAL(HAVE_WINDOWS, test $have_windows = "1") |
108 |
|
|
109 |
AC_MSG_CHECKING([whether UNIX98 compatible]) |
AC_MSG_CHECKING([whether UNIX98 compatible]) |
110 |
AC_LANG_SAVE |
AC_LANG_PUSH([C]) |
111 |
AC_LANG_C |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
|
AC_TRY_RUN([ |
|
112 |
#ifndef _GNU_SOURCE |
#ifndef _GNU_SOURCE |
113 |
#define _GNU_SOURCE 1 |
#define _GNU_SOURCE 1 |
114 |
#endif |
#endif |
120 |
exit(-1); /* not UNIX98 compatible */ |
exit(-1); /* not UNIX98 compatible */ |
121 |
#endif |
#endif |
122 |
} |
} |
123 |
], |
]])], |
124 |
have_unix98="yes", |
have_unix98="yes", |
125 |
have_unix98="no", |
have_unix98="no", |
126 |
have_unix98="no" |
have_unix98="no" |
127 |
) |
) |
128 |
AC_LANG_RESTORE |
AC_LANG_POP([C]) |
129 |
AC_MSG_RESULT([$have_unix98]) |
AC_MSG_RESULT([$have_unix98]) |
130 |
if test "$have_unix98" = "no"; then |
if test "$have_unix98" = "no" -a "$have_windows" = "0" -a "$mac" = "no" ; then |
131 |
if test "x$HAVE_UNIX98" = "x"; then |
if test "x$HAVE_UNIX98" = "x"; then |
132 |
echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for" |
echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for" |
133 |
echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run |
echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run" |
134 |
echo "./configure with environment variable HAVE_UNIX98=1 in case you think you |
echo "./configure with environment variable HAVE_UNIX98=1 in case you think you" |
135 |
echo "have a UNIX98 compatible system." |
echo "have a UNIX98 compatible system." |
136 |
exit -1; |
exit -1; |
137 |
fi |
fi |
140 |
# check for <features.h> |
# check for <features.h> |
141 |
AC_CHECK_HEADERS(features.h) |
AC_CHECK_HEADERS(features.h) |
142 |
|
|
143 |
|
# test for POSIX thread library |
144 |
|
m4_ifdef([m4_include(m4/pthread.m4)],, |
145 |
|
[sinclude([m4/pthread.m4])]) |
146 |
|
ACX_PTHREAD |
147 |
|
LIBS="$PTHREAD_LIBS $LIBS" |
148 |
|
CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
149 |
|
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" |
150 |
|
CC="$PTHREAD_CC" |
151 |
|
|
152 |
|
# check for a bug in NPTL-enabled glibc |
153 |
|
# (see Gentoo bug report #194076) |
154 |
|
AC_ARG_ENABLE(nptl-bug-check, |
155 |
|
[ --disable-nptl-bug-check |
156 |
|
Disable check for a bug in certain NPTL-enabled |
157 |
|
glibc versions that caused crashs.], |
158 |
|
[config_check_nptl_bug="$enableval"], |
159 |
|
[config_check_nptl_bug="yes"] |
160 |
|
) |
161 |
|
if test "$config_check_nptl_bug" = "yes"; then |
162 |
|
m4_ifdef([m4_include(m4/nptl_bug.m4)],, |
163 |
|
[sinclude([m4/nptl_bug.m4])]) |
164 |
|
ACX_NPTL_GLIBC_BUG([ |
165 |
|
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
166 |
|
echo "You seem to have a buggy PTHREAD library! LinuxSampler would" |
167 |
|
echo "probably crash due to this. Please report us the system you are" |
168 |
|
echo "using and/or file a bug report to the bug tracking system of" |
169 |
|
echo "your distribution." |
170 |
|
echo "If you have a NPTL-enabled glibc AND it was compiled for TLS as" |
171 |
|
echo "well, you can try to circumvent this problem for now by setting" |
172 |
|
echo "the environment variable LD_ASSUME_KERNEL=\"2.4.1\" , which" |
173 |
|
echo "should cause this test to pass." |
174 |
|
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
175 |
|
AC_MSG_ERROR([possibly NPTL glibc bug detected]) |
176 |
|
]) |
177 |
|
else |
178 |
|
echo "NPTL glibc bug check disabled" |
179 |
|
fi |
180 |
|
|
181 |
|
# FIXME: this is actually a dependency of libgig, not of LS directly, why |
182 |
|
# isn't it hidden by libgig? |
183 |
|
AC_CHECK_HEADERS(uuid/uuid.h) |
184 |
|
AC_SEARCH_LIBS(uuid_generate, uuid) |
185 |
|
|
186 |
|
# In case Bison is available, determine the exact version, since we need to |
187 |
|
# use different custom parser code for Bison 2.x vs. Bison 3.x generated |
188 |
|
# parser yacc tables. |
189 |
|
if echo "$YACC" | grep -q bison; then |
190 |
|
# NOTE: m4 removes [], that's why it needs to be escaped |
191 |
|
bison_version=[`$YACC --version | head -n 1 | sed -e 's/[^0-9.]*\([-0-9.]\+\)$/\1/'`] |
192 |
|
bison_version_major=`echo $bison_version | cut -d. -f1` |
193 |
|
bison_version_minor=`echo $bison_version | cut -d. -f2` |
194 |
|
AC_DEFINE_UNQUOTED(HAVE_BISON_MAJ,$bison_version_major,[Define to the major version of the GNU Bison program installed.]) |
195 |
|
AC_DEFINE_UNQUOTED(HAVE_BISON_MIN,$bison_version_minor,[Define to the minor version of the GNU Bison program installed.]) |
196 |
|
fi |
197 |
|
|
198 |
|
|
199 |
|
|
200 |
########################################################################### |
########################################################################### |
201 |
# Checks for available audio and MIDI systems / drivers |
# Checks for available audio and MIDI systems / drivers |
209 |
[ --disable-alsa-driver |
[ --disable-alsa-driver |
210 |
Disable support for the Advanced Linux Sound |
Disable support for the Advanced Linux Sound |
211 |
Architecture (ALSA).], |
Architecture (ALSA).], |
212 |
[config_alsa_driver="no"], |
[config_alsa_driver="$enableval"], |
213 |
[config_alsa_driver="yes"] |
[config_alsa_driver="yes"] |
214 |
) |
) |
215 |
have_alsa=0 |
have_alsa=0 |
229 |
fi |
fi |
230 |
|
|
231 |
echo -n "checking Alsa version... " |
echo -n "checking Alsa version... " |
232 |
AC_LANG_SAVE |
AC_LANG_PUSH([C]) |
233 |
AC_LANG_C |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
|
AC_TRY_RUN([ |
|
234 |
#include <alsa/asoundlib.h> |
#include <alsa/asoundlib.h> |
235 |
void main(void) { |
void main(void) { |
236 |
/* ensure backward compatibility */ |
/* ensure backward compatibility */ |
239 |
#endif |
#endif |
240 |
exit(SND_LIB_MAJOR); |
exit(SND_LIB_MAJOR); |
241 |
} |
} |
242 |
], |
]])], |
243 |
alsa_major=0, |
alsa_major=0, |
244 |
alsa_major=$?, |
alsa_major=$?, |
245 |
alsa_major=0 |
alsa_major=0 |
246 |
) |
) |
247 |
AC_TRY_RUN([ |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
248 |
#include <alsa/asoundlib.h> |
#include <alsa/asoundlib.h> |
249 |
void main(void) { |
void main(void) { |
250 |
/* ensure backward compatibility */ |
/* ensure backward compatibility */ |
253 |
#endif |
#endif |
254 |
exit(SND_LIB_MINOR); |
exit(SND_LIB_MINOR); |
255 |
} |
} |
256 |
], |
]])], |
257 |
alsa_minor=0, |
alsa_minor=0, |
258 |
alsa_minor=$?, |
alsa_minor=$?, |
259 |
alsa_minor=0 |
alsa_minor=0 |
260 |
) |
) |
261 |
AC_TRY_RUN([ |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
262 |
#include <alsa/asoundlib.h> |
#include <alsa/asoundlib.h> |
263 |
void main(void) { |
void main(void) { |
264 |
/* ensure backward compatibility */ |
/* ensure backward compatibility */ |
267 |
#endif |
#endif |
268 |
exit(SND_LIB_SUBMINOR); |
exit(SND_LIB_SUBMINOR); |
269 |
} |
} |
270 |
], |
]])], |
271 |
alsa_subminor=0, |
alsa_subminor=0, |
272 |
alsa_subminor=$?, |
alsa_subminor=$?, |
273 |
alsa_subminor=0 |
alsa_subminor=0 |
274 |
) |
) |
275 |
AC_LANG_RESTORE |
AC_LANG_POP([C]) |
276 |
echo "$alsa_major.$alsa_minor.$alsa_subminor"; |
echo "$alsa_major.$alsa_minor.$alsa_subminor"; |
277 |
AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.]) |
AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.]) |
278 |
AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.]) |
AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.]) |
282 |
fi |
fi |
283 |
AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1") |
AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1") |
284 |
AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.]) |
AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.]) |
285 |
|
config_have_alsa="no" |
286 |
|
if test $have_alsa = "1"; then |
287 |
|
config_have_alsa="yes" |
288 |
|
fi |
289 |
|
|
290 |
# JACK |
# JACK |
291 |
AC_ARG_ENABLE(jack-driver, |
AC_ARG_ENABLE(jack-driver, |
292 |
[ --disable-jack-driver |
[ --disable-jack-driver |
293 |
Disable support for the Jack Audio Connection Kit |
Disable support for the Jack Audio Connection Kit |
294 |
(JACK).], |
(JACK).], |
295 |
[config_jack_driver="no"], |
[config_jack_driver="$enableval"], |
296 |
[config_jack_driver="yes"] |
[config_jack_driver="yes"] |
297 |
) |
) |
298 |
have_jack=0 |
have_jack=0 |
301 |
if test $have_jack = "1"; then |
if test $have_jack = "1"; then |
302 |
AC_SUBST(JACK_LIBS) |
AC_SUBST(JACK_LIBS) |
303 |
AC_SUBST(JACK_CFLAGS) |
AC_SUBST(JACK_CFLAGS) |
304 |
AC_CHECK_LIB(jack, jack_client_name_size, [AC_DEFINE(HAVE_JACK_CLIENT_NAME_SIZE, 1, [Define to 1 if you have the `jack_client_name_size' function.])], , $JACK_LIBS) |
linuxsampler_save_LIBS=$LIBS |
305 |
|
LIBS="$JACK_LIBS $LIBS" |
306 |
|
AC_CHECK_FUNCS(jack_client_name_size jack_client_open \ |
307 |
|
jack_on_info_shutdown) |
308 |
|
LIBS=$linuxsampler_save_LIBS |
309 |
have_audio_output_driver="true"; |
have_audio_output_driver="true"; |
310 |
fi |
fi |
311 |
else |
else |
313 |
fi |
fi |
314 |
AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1") |
AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1") |
315 |
AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.]) |
AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.]) |
316 |
|
config_have_jack="no" |
317 |
|
if test $have_jack = "1"; then |
318 |
|
config_have_jack="yes" |
319 |
|
fi |
320 |
|
|
321 |
|
# JACK MIDI |
322 |
|
have_jack_midi=0 |
323 |
|
if test $have_jack = "1"; then |
324 |
|
linuxsampler_save_CFLAGS=$CFLAGS |
325 |
|
linuxsampler_save_LIBS=$LIBS |
326 |
|
CFLAGS="$JACK_CFLAGS $CFLAGS" |
327 |
|
LIBS="$JACK_LIBS $LIBS" |
328 |
|
AC_CHECK_HEADER(jack/midiport.h, have_jack_midi=1, have_jack_midi=0) |
329 |
|
if test $have_jack_midi = "1"; then |
330 |
|
AC_CHECK_FUNCS(jack_midi_get_event_count) |
331 |
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jack/midiport.h>]], [[ |
332 |
|
jack_midi_clear_buffer(0, 0); |
333 |
|
]])], [AC_DEFINE(JACK_MIDI_FUNCS_NEED_NFRAMES, 1, |
334 |
|
[Define to 1 if you have the old jack midi functions that need an nframes argument.])]) |
335 |
|
have_midi_input_driver="true" |
336 |
|
fi |
337 |
|
CFLAGS=$linuxsampler_save_CFLAGS |
338 |
|
LIBS=$linuxsampler_save_LIBS |
339 |
|
fi |
340 |
|
AM_CONDITIONAL(HAVE_JACK_MIDI, test $have_jack_midi = "1") |
341 |
|
AC_DEFINE_UNQUOTED(HAVE_JACK_MIDI, $have_jack_midi, |
342 |
|
[Define to 1 if you have JACK with MIDI support installed.]) |
343 |
|
config_have_jack_midi="no" |
344 |
|
if test $have_jack_midi = "1"; then |
345 |
|
config_have_jack_midi="yes" |
346 |
|
fi |
347 |
|
|
348 |
# ARTS |
# ARTS |
349 |
AC_ARG_ENABLE(arts-driver, |
AC_ARG_ENABLE(arts-driver, |
350 |
[ --disable-arts-driver |
[ --disable-arts-driver |
351 |
Disable support for the Analogue Realtime System |
Disable support for the Analogue Realtime System |
352 |
(aRts).], |
(aRts).], |
353 |
[config_arts_driver="no"], |
[config_arts_driver="$enableval"], |
354 |
[config_arts_driver="yes"] |
[config_arts_driver="yes"] |
355 |
) |
) |
356 |
have_arts=0 |
have_arts=0 |
366 |
fi |
fi |
367 |
AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1") |
AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1") |
368 |
AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.]) |
AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.]) |
369 |
|
config_have_arts="no" |
370 |
|
if test $have_arts = "1"; then |
371 |
|
config_have_arts="yes" |
372 |
|
fi |
373 |
|
|
374 |
|
# ASIO AUDIO (Win32) |
375 |
|
AC_ARG_ENABLE(asiosdk-dir, |
376 |
|
[ --enable-asiosdk-dir |
377 |
|
Directory where the ASIO SDK is located, this automatically |
378 |
|
enables the compilation of the ASIO audio output driver.], |
379 |
|
[config_asiosdk_dir="${enableval}"], |
380 |
|
[config_asiosdk_dir="."] |
381 |
|
) |
382 |
|
AC_SUBST(config_asiosdk_dir) |
383 |
|
|
384 |
|
AC_ARG_ENABLE(asio-driver, |
385 |
|
[ --disable-asio-driver |
386 |
|
Disable support for the Windows ASIO driver.], |
387 |
|
[config_asio_driver="$enableval"], |
388 |
|
[config_asio_driver="yes"] |
389 |
|
) |
390 |
|
have_asio=0 |
391 |
|
ASIOSDK_BASEDIR= |
392 |
|
if test "$config_asio_driver" = "yes"; then |
393 |
|
asiosdk_headerfile=$config_asiosdk_dir/ASIOSDK2/common/asio.h |
394 |
|
echo -n "checking for ASIO headerfile: $asiosdk_headerfile ...." |
395 |
|
if test -e $asiosdk_headerfile ; then |
396 |
|
echo yes |
397 |
|
have_asio=1 |
398 |
|
ASIOSDK_BASEDIR="$config_asiosdk_dir" |
399 |
|
else |
400 |
|
echo no |
401 |
|
have_asio=0 |
402 |
|
fi |
403 |
|
if test "$have_asio" = "1"; then |
404 |
|
have_audio_output_driver="true" |
405 |
|
fi |
406 |
|
else |
407 |
|
echo "Windows ASIO support disabled by configure script parameter" |
408 |
|
fi |
409 |
|
AC_SUBST(ASIOSDK_BASEDIR) |
410 |
|
AM_CONDITIONAL(HAVE_ASIO, test $have_asio = "1") |
411 |
|
AC_DEFINE_UNQUOTED(HAVE_ASIO,$have_asio,[Define to 1 if you have ASIO installed.]) |
412 |
|
config_have_asio="no" |
413 |
|
if test $have_asio = "1"; then |
414 |
|
config_have_asio="yes" |
415 |
|
fi |
416 |
|
|
417 |
# MidiShare (Linux, OS X, Windows) |
# MidiShare (Linux, OS X, Windows) |
418 |
AC_ARG_ENABLE(midishare-driver, |
AC_ARG_ENABLE(midishare-driver, |
419 |
[ --disable-midishare-driver |
[ --disable-midishare-driver |
420 |
Disable support for the MidiShare system.], |
Disable support for the MidiShare system.], |
421 |
[config_midishare_driver="no"], |
[config_midishare_driver="$enableval"], |
422 |
[config_midishare_driver="yes"] |
[config_midishare_driver="yes"] |
423 |
) |
) |
424 |
have_midishare=0 |
have_midishare=0 |
439 |
fi |
fi |
440 |
AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1") |
AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1") |
441 |
AC_DEFINE_UNQUOTED(HAVE_MIDISHARE,$have_midishare,[Define to 1 if you have MidiShare installed.]) |
AC_DEFINE_UNQUOTED(HAVE_MIDISHARE,$have_midishare,[Define to 1 if you have MidiShare installed.]) |
442 |
|
config_have_midishare="no" |
443 |
|
if test $have_midishare = "1"; then |
444 |
|
config_have_midishare="yes" |
445 |
|
fi |
446 |
|
|
447 |
# CoreMIDI (OS X) |
# CoreMIDI (OS X) |
448 |
AC_ARG_ENABLE(coremidi-driver, |
AC_ARG_ENABLE(coremidi-driver, |
449 |
[ --disable-coremidi-driver |
[ --disable-coremidi-driver |
450 |
Disable support for the Apple CoreMIDI system.], |
Disable support for the Apple CoreMIDI system.], |
451 |
[config_coremidi_driver="no"], |
[config_coremidi_driver="$enableval"], |
452 |
[config_coremidi_driver="yes"] |
[config_coremidi_driver="yes"] |
453 |
) |
) |
454 |
have_coremidi=0 |
have_coremidi=0 |
465 |
fi |
fi |
466 |
AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1") |
AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1") |
467 |
AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.]) |
AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.]) |
468 |
|
config_have_coremidi="no" |
469 |
|
if test $have_coremidi = "1"; then |
470 |
|
config_have_coremidi="yes" |
471 |
|
fi |
472 |
|
|
473 |
|
# CoreAudio (OS X) |
474 |
|
AC_ARG_ENABLE(coreaudio-driver, |
475 |
|
[ --disable-coreaudio-driver |
476 |
|
Disable support for the Apple CoreAudio system.], |
477 |
|
[config_coreaudio_driver="$enableval"], |
478 |
|
[config_coreaudio_driver="yes"] |
479 |
|
) |
480 |
|
have_coreaudio=0 |
481 |
|
if test "$config_coreaudio_driver" = "yes"; then |
482 |
|
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, |
483 |
|
have_coreaudio=1, |
484 |
|
have_coreaudio=0 |
485 |
|
) |
486 |
|
if test "$have_coreaudio" = "1"; then |
487 |
|
have_audio_output_driver="true" |
488 |
|
fi |
489 |
|
else |
490 |
|
echo "CoreAudio support disabled by configure script parameter" |
491 |
|
fi |
492 |
|
AM_CONDITIONAL(HAVE_COREAUDIO, test $have_coreaudio = "1") |
493 |
|
AC_DEFINE_UNQUOTED(HAVE_COREAUDIO,$have_coreaudio,[Define to 1 if you have CoreAudio installed.]) |
494 |
|
config_have_coreaudio="no" |
495 |
|
if test $have_coreaudio = "1"; then |
496 |
|
config_have_coreaudio="yes" |
497 |
|
fi |
498 |
|
|
499 |
|
# MME MIDI (Win32) |
500 |
|
AC_ARG_ENABLE(mmemidi-driver, |
501 |
|
[ --disable-mmemidi-driver |
502 |
|
Disable support for the Windows MME MIDI system.], |
503 |
|
[config_mmemidi_driver="$enableval"], |
504 |
|
[config_mmemidi_driver="yes"] |
505 |
|
) |
506 |
|
have_mmemidi=0 |
507 |
|
if test "$config_mmemidi_driver" = "yes"; then |
508 |
|
AC_CHECK_HEADERS(mmsystem.h, |
509 |
|
have_mmemidi=1, |
510 |
|
have_mmemidi=0 |
511 |
|
) |
512 |
|
if test "$have_mmemidi" = "1"; then |
513 |
|
have_midi_input_driver="true" |
514 |
|
fi |
515 |
|
else |
516 |
|
echo "MME MIDI support disabled by configure script parameter" |
517 |
|
fi |
518 |
|
AM_CONDITIONAL(HAVE_MME_MIDI, test $have_mmemidi = "1") |
519 |
|
AC_DEFINE_UNQUOTED(HAVE_MME_MIDI,$have_mmemidi,[Define to 1 if you have MME MIDI installed.]) |
520 |
|
config_have_mme="no" |
521 |
|
if test $have_mmemidi = "1"; then |
522 |
|
config_have_mme="yes" |
523 |
|
fi |
524 |
|
|
525 |
|
# DSSI |
526 |
|
AC_CHECK_HEADERS(dssi.h, |
527 |
|
config_have_dssi="yes", |
528 |
|
config_have_dssi="no") |
529 |
|
AM_CONDITIONAL(HAVE_DSSI, test $config_have_dssi = "yes") |
530 |
|
|
531 |
|
# LV2 |
532 |
|
PKG_CHECK_MODULES(LV2, lv2 >= 1.0.0, config_have_lv2="yes", config_have_lv2="no") |
533 |
|
AC_SUBST(LV2_CFLAGS) |
534 |
|
AC_SUBST(LV2_LIBS) |
535 |
|
AM_CONDITIONAL(HAVE_LV2, test $config_have_lv2 = "yes") |
536 |
|
|
537 |
|
# VST |
538 |
|
AC_ARG_ENABLE(vstsdk-dir, |
539 |
|
[ --enable-vstsdk-dir |
540 |
|
Directory where the VST SDK is located. |
541 |
|
This automatically enables the compilation |
542 |
|
of the VST plugin.], |
543 |
|
[VSTSDK_DIR="${enableval}"], |
544 |
|
[VSTSDK_DIR=] |
545 |
|
) |
546 |
|
AC_SUBST(VSTSDK_DIR) |
547 |
|
AM_CONDITIONAL(HAVE_VST, test "x$VSTSDK_DIR" != "x") |
548 |
|
config_have_vst="no" |
549 |
|
if test "x$VSTSDK_DIR" != "x"; then |
550 |
|
config_have_vst="yes" |
551 |
|
fi |
552 |
|
|
553 |
|
# AU |
554 |
|
AC_CHECK_HEADERS(AudioUnit/AudioUnit.h, |
555 |
|
config_have_au="yes", |
556 |
|
config_have_au="no") |
557 |
|
AM_CONDITIONAL(HAVE_AU, test $config_have_au = "yes") |
558 |
|
AM_CONDITIONAL(HAVE_AUFLAGS, test "$AUFLAGS" != "") |
559 |
|
|
560 |
|
if test $config_have_au = "yes" ; then |
561 |
|
if test "x$DEVELOPER_EXTRAS_DIR" = "x" ; then |
562 |
|
if test -d /Developer/Extras ; then |
563 |
|
DEVELOPER_EXTRAS_DIR=/Developer/Extras |
564 |
|
else |
565 |
|
DEVELOPER_EXTRAS_DIR=/Developer/Examples |
566 |
|
fi |
567 |
|
fi |
568 |
|
AC_SUBST(DEVELOPER_EXTRAS_DIR) |
569 |
|
fi |
570 |
|
|
571 |
|
if test "x$MAC_PLUGIN_INSTALL_DIR" = "x" ; then |
572 |
|
MAC_PLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins |
573 |
|
fi |
574 |
|
AC_SUBST(MAC_PLUGIN_INSTALL_DIR) |
575 |
|
|
576 |
|
# have we found at least one MIDI input and one audio output driver ? |
577 |
|
if test "$have_midi_input_driver" = "false"; then |
578 |
|
echo "No supported MIDI input system found!" |
579 |
|
echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:" |
580 |
|
echo "ALSA, JACK, MIDIShare, CoreMIDI, MME." |
581 |
|
echo "If you think you have one of those available on your system, make sure you" |
582 |
|
echo "also have the respective development (header) files installed." |
583 |
|
exit -1; |
584 |
|
fi |
585 |
|
if test "$have_audio_output_driver" = "false"; then |
586 |
|
echo "No supported audio output system found!" |
587 |
|
echo "Sorry, LinuxSampler only supports ALSA, JACK, ARTS and ASIO as audio output" |
588 |
|
echo "driver at the moment!" |
589 |
|
exit -1; |
590 |
|
fi |
591 |
|
|
592 |
|
|
593 |
|
|
594 |
|
########################################################################### |
595 |
|
# Checks for various DLL libraries |
596 |
|
|
597 |
# Check presence of libgig |
# Check presence of libgig |
598 |
libgig_version="3.0.0" |
libgig_version="3.3.0" |
599 |
PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false) |
PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false) |
600 |
if test "$HAVE_GIG" = "false"; then |
if test "$HAVE_GIG" = "false"; then |
601 |
echo "Required libgig version not found!" |
echo "Required libgig version not found!" |
607 |
AC_SUBST(GIG_CFLAGS) |
AC_SUBST(GIG_CFLAGS) |
608 |
AC_SUBST(GIG_LIBS) |
AC_SUBST(GIG_LIBS) |
609 |
|
|
610 |
# SQLITE3 |
# SF2 Engine (requires libgig) |
611 |
PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE3=true, HAVE_SQLITE3=false) |
AC_ARG_ENABLE(sf2-engine, |
612 |
AC_SUBST(SQLITE3_LIBS) |
[ --disable-sf2-engine |
613 |
AC_SUBST(SQLITE3_CFLAGS) |
Disable compilation of the SF2 engine. |
614 |
if test $HAVE_SQLITE3 = false; then |
You need to have libgig installed.], |
615 |
HAVE_SQLITE3=0; |
[config_sf2_engine="$enableval"], |
616 |
echo "no, support for instrument DB will be disabled!" |
[config_sf2_engine="yes"] |
617 |
|
) |
618 |
|
HAVE_SF2=0; |
619 |
|
if test "$config_sf2_engine" = "yes"; then |
620 |
|
HAVE_SF2=1 |
621 |
else |
else |
622 |
HAVE_SQLITE3=1 |
echo "SF2 engine disabled by configure script parameter" |
623 |
echo "yes" |
fi |
624 |
|
AM_CONDITIONAL(HAVE_SF2, test $HAVE_SF2 = 1) |
625 |
|
AC_DEFINE_UNQUOTED(HAVE_SF2,$HAVE_SF2,[Define to 1 if you want SF2 engine and have libsf2 installed.]) |
626 |
|
config_have_sf2="no" |
627 |
|
if test $HAVE_SF2 = "1"; then |
628 |
|
config_have_sf2="yes" |
629 |
fi |
fi |
|
AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1) |
|
|
AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.]) |
|
630 |
|
|
631 |
if test "$have_midi_input_driver" = "false"; then |
# Check presence of libsndfile |
632 |
echo "No supported MIDI input system found!" |
libsndfile_version="1.0" |
633 |
echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:" |
PKG_CHECK_MODULES(SNDFILE, sndfile >= $libsndfile_version, HAVE_SNDFILE=true, HAVE_SNDFILE=false) |
634 |
echo "ALSA, MIDIShare, CoreMIDI." |
if test "$HAVE_SNDFILE" = "false"; then |
635 |
echo "If you think you have one of those available on your system, make sure you" |
echo "Required libsndfile version not found!" |
636 |
echo "also have the respective development (header) files installed." |
echo "You need to have libsndfile version ${libsndfile_version} installed!" |
637 |
exit -1; |
exit -1; |
638 |
|
else |
639 |
|
echo "yes, found libsndfile $libsndfile_version" |
640 |
fi |
fi |
641 |
if test "$have_audio_output_driver" = "false"; then |
AC_SUBST(SNDFILE_CFLAGS) |
642 |
echo "No supported audio output system found!" |
AC_SUBST(SNDFILE_LIBS) |
643 |
echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!" |
|
644 |
exit -1; |
# Check for Vorbis and FLAC support in libsndfile |
645 |
|
linuxsampler_save_CFLAGS=$CFLAGS |
646 |
|
CFLAGS="$SNDFILE_CFLAGS $CFLAGS" |
647 |
|
AC_CHECK_DECLS([SF_FORMAT_VORBIS, SF_FORMAT_FLAC], [], [], [[#include <sndfile.h>]]) |
648 |
|
|
649 |
|
# Check for loop functionality in libsndfile |
650 |
|
AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],, |
651 |
|
[AC_MSG_WARN([Your version of libsndfile does not support |
652 |
|
reading of loop information. LinuxSampler will not be able to |
653 |
|
extract loop information from sample files.])], |
654 |
|
[#include <sndfile.h>]) |
655 |
|
CFLAGS=$linuxsampler_save_CFLAGS |
656 |
|
|
657 |
|
# Instruments DB feature (requires SQLite 3.3) |
658 |
|
AC_ARG_ENABLE(instruments-db, |
659 |
|
[ --disable-instruments-db |
660 |
|
Disable compilation of the sampler's instruments |
661 |
|
database feature. You need to have SQLite 3.3 |
662 |
|
or younger installed for this feature.], |
663 |
|
[config_instruments_db="$enableval"], |
664 |
|
[config_instruments_db="yes"] |
665 |
|
) |
666 |
|
HAVE_SQLITE3=0; |
667 |
|
if test "$config_instruments_db" = "yes"; then |
668 |
|
# Check presence of sqlite3 |
669 |
|
sqlite_version="3.3" |
670 |
|
PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false) |
671 |
|
AC_SUBST(SQLITE3_LIBS) |
672 |
|
AC_SUBST(SQLITE3_CFLAGS) |
673 |
|
if test $HAVE_SQLITE3 = false; then |
674 |
|
HAVE_SQLITE3=0 |
675 |
|
config_instruments_db="no" |
676 |
|
echo "*** Required sqlite version not found!" |
677 |
|
echo "*** You need to have sqlite version ${sqlite_version} or higher" |
678 |
|
echo "*** for instruments database support to be enabled." |
679 |
|
echo "*** Support for instruments DB will be disabled!" |
680 |
|
else |
681 |
|
HAVE_SQLITE3=1 |
682 |
|
fi |
683 |
|
else |
684 |
|
echo "Instruments DB feature disabled by configure script parameter" |
685 |
fi |
fi |
686 |
|
AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1) |
687 |
|
AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you want the instruments DB feature and have SQLITE3 installed.]) |
688 |
|
|
689 |
|
|
690 |
|
|
691 |
########################################################################### |
########################################################################### |
694 |
# TODO: should we use AC_ARG_VAR(variable, description) instead? |
# TODO: should we use AC_ARG_VAR(variable, description) instead? |
695 |
|
|
696 |
AC_ARG_ENABLE(asm, |
AC_ARG_ENABLE(asm, |
697 |
[ --enable-asm |
[ --disable-asm |
698 |
Enable hand-crafted assembly optimizations |
Enable hand-crafted assembly optimizations |
699 |
(default=off). LinuxSampler provides CPU specific |
(default=on). LinuxSampler provides CPU specific |
700 |
assembly optimizations for the most important |
assembly optimizations. This is currently limited |
701 |
synthesis algorithms. This is currently disabled |
to just enter a fast (denormal) FPU mode on x86 |
702 |
by default since current asm code is broken.], |
platforms. There are currently no synthesis core |
703 |
[config_asm="yes"], |
assembly optimizations anymore since LS 0.4.0], |
704 |
[config_asm="no"] |
[config_asm="$enableval"], |
705 |
|
[config_asm="yes"] |
706 |
) |
) |
707 |
if test "$config_asm" = "yes"; then |
if test "$config_asm" = "yes"; then |
708 |
AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable hand-crafted asm optimizations.]) |
AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable asm optimizations.]) |
709 |
fi |
fi |
710 |
|
|
711 |
AC_ARG_ENABLE(dev-mode, |
AC_ARG_ENABLE(dev-mode, |
712 |
[ --disable-dev-mode |
[ --enable-dev-mode |
713 |
Disable development mode (default=on). In that mode |
Enable development mode (default=off). In that mode |
714 |
we do some extra sanity checks here and there. |
we do some extra sanity checks here and there. |
715 |
This helps to spot possible problems, but reduces |
This helps to spot possible problems, but reduces |
716 |
efficiency a bit], |
efficiency a bit], |
717 |
[config_dev_mode="no"], |
[config_dev_mode="$enableval"], |
718 |
[config_dev_mode="yes"] |
[config_dev_mode="no"] |
719 |
) |
) |
720 |
if test "$config_dev_mode" = "yes"; then |
if test "$config_dev_mode" = "yes"; then |
721 |
AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.]) |
AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.]) |
742 |
context as well. Otherwise if disabled |
context as well. Otherwise if disabled |
743 |
segmentation faults will be forced by the |
segmentation faults will be forced by the |
744 |
application on critical errors.], |
application on critical errors.], |
745 |
[config_rt_exceptions="yes"], |
[config_rt_exceptions="$enableval"], |
746 |
[config_rt_exceptions="no"] |
[config_rt_exceptions="no"] |
747 |
) |
) |
748 |
if test "$config_rt_exceptions" = "yes"; then |
if test "$config_rt_exceptions" = "yes"; then |
749 |
AC_DEFINE_UNQUOTED(CONFIG_RT_EXCEPTIONS, 1, [Define to 1 to allow exceptions in the realtime context.]) |
AC_DEFINE_UNQUOTED(CONFIG_RT_EXCEPTIONS, 1, [Define to 1 to allow exceptions in the realtime context.]) |
750 |
fi |
fi |
751 |
|
|
752 |
|
config_pthread_testcancel="$mac" |
753 |
|
AC_ARG_ENABLE(pthread-testcancel, |
754 |
|
[ --enable-pthread-testcancel |
755 |
|
Enable pthread_testcancel() calls and avoid |
756 |
|
asynchronous cancel of pthreads (default=yes |
757 |
|
for Mac targets, no otherwise).], |
758 |
|
[config_pthread_testcancel="$enableval"], |
759 |
|
[]) |
760 |
|
if test "$config_pthread_testcancel" = "yes"; then |
761 |
|
AC_DEFINE_UNQUOTED(CONFIG_PTHREAD_TESTCANCEL, 1, [Define to 1 to enable pthread_testcancel() calls.]) |
762 |
|
fi |
763 |
|
|
764 |
AC_ARG_ENABLE(preload-samples, |
AC_ARG_ENABLE(preload-samples, |
765 |
[ --enable-preload-samples |
[ --enable-preload-samples |
766 |
Due to seeking and latency issues with hard drives |
Due to seeking and latency issues with hard drives |
866 |
|
|
867 |
AC_ARG_ENABLE(max-streams, |
AC_ARG_ENABLE(max-streams, |
868 |
[ --enable-max-streams |
[ --enable-max-streams |
869 |
Maximum amount of disk streams (default=90). This |
Initial maximum amount of disk streams |
870 |
value should always be higher than the maximum |
(default=90). This value can be changed at |
871 |
amount of voices.], |
runtime. It should always be higher than the |
872 |
|
maximum amount of voices.], |
873 |
[config_max_streams="${enableval}"], |
[config_max_streams="${enableval}"], |
874 |
[config_max_streams="90"] |
[config_max_streams="90"] |
875 |
) |
) |
876 |
AC_DEFINE_UNQUOTED(CONFIG_MAX_STREAMS, $config_max_streams, [Define max. streams.]) |
AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_MAX_STREAMS, $config_max_streams, [Define initial max. streams.]) |
877 |
|
|
878 |
AC_ARG_ENABLE(max-voices, |
AC_ARG_ENABLE(max-voices, |
879 |
[ --enable-max-voices |
[ --enable-max-voices |
880 |
Maximum amount of voices (default=64). This value |
Initial maximum amount of voices (default=64). |
881 |
should always be lower than the maximum amount of |
This value can be changed at runtime. It should |
882 |
disk streams.], |
always be lower than the maximum amount of disk |
883 |
|
streams.], |
884 |
[config_max_voices="${enableval}"], |
[config_max_voices="${enableval}"], |
885 |
[config_max_voices="64"] |
[config_max_voices="64"] |
886 |
) |
) |
887 |
AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.]) |
AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_MAX_VOICES, $config_max_voices, [Define initial max. voices.]) |
888 |
|
|
889 |
AC_ARG_ENABLE(subfragment-size, |
AC_ARG_ENABLE(subfragment-size, |
890 |
[ --enable-subfragment-size |
[ --enable-subfragment-size |
901 |
) |
) |
902 |
AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).]) |
AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).]) |
903 |
|
|
904 |
AC_ARG_ENABLE(global-attenuation, |
AC_ARG_ENABLE(global-attenuation-default, |
905 |
[ --enable-global-attenuation |
[ --enable-global-attenuation-default |
906 |
To prevent clipping all samples will be lowered |
To prevent clipping all samples will be lowered |
907 |
in amplitude by this given factor. |
in amplitude by this given default factor (can |
908 |
|
be overridden at runtime). |
909 |
(default=0.35)], |
(default=0.35)], |
910 |
[config_global_attenuation="${enableval}"], |
[config_global_attenuation_default="${enableval}"], |
911 |
[config_global_attenuation="0.35"] |
[config_global_attenuation_default="0.35"] |
912 |
) |
) |
913 |
AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION, $config_global_attenuation, [Define global volume attenuation (as floating point factor).]) |
AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION_DEFAULT, $config_global_attenuation_default, [Define default global volume attenuation (as floating point factor).]) |
914 |
|
|
915 |
AC_ARG_ENABLE(voice-steal-algo, |
AC_ARG_ENABLE(voice-steal-algo, |
916 |
[ --enable-voice-steal-algo |
[ --enable-voice-steal-algo |
950 |
If enabled will force filter to be used even if |
If enabled will force filter to be used even if |
951 |
no usage was define in instrument patch files. |
no usage was define in instrument patch files. |
952 |
(default=no).], |
(default=no).], |
953 |
[config_force_filter="yes"], |
[config_force_filter="$enableval"], |
954 |
[config_force_filter="no"] |
[config_force_filter="no"] |
955 |
) |
) |
956 |
if test "$config_force_filter" = "yes"; then |
if test "$config_force_filter" = "yes"; then |
1040 |
messages which do not provide a correct checksum |
messages which do not provide a correct checksum |
1041 |
will be ignored. This is disabled by default as |
will be ignored. This is disabled by default as |
1042 |
not all devices honor GS checksums.], |
not all devices honor GS checksums.], |
1043 |
[config_assert_gs_sysex_checksum="yes"], |
[config_assert_gs_sysex_checksum="$enableval"], |
1044 |
[config_assert_gs_sysex_checksum="no"] |
[config_assert_gs_sysex_checksum="no"] |
1045 |
) |
) |
1046 |
if test "config_assert_gs_sysex_checksum" = "yes"; then |
if test "config_assert_gs_sysex_checksum" = "yes"; then |
1086 |
Similar to intmath but uses abs() function. |
Similar to intmath but uses abs() function. |
1087 |
Depending on compiler and platrofm this could |
Depending on compiler and platrofm this could |
1088 |
perform better than integer math as it avoids |
perform better than integer math as it avoids |
1089 |
an extra integer multiply instruction. |
an extra integer multiply instruction. |
|
|
|
1090 |
diharmonic: |
diharmonic: |
1091 |
The triangular wave will be approximated by adding two |
The triangular wave will be approximated by adding two |
1092 |
sinusoidials. This solution might especially hurt on |
sinusoidials. This solution might especially hurt on |
1120 |
Similar to intmath but uses abs() function. |
Similar to intmath but uses abs() function. |
1121 |
Depending on compiler and platrofm this could |
Depending on compiler and platrofm this could |
1122 |
perform better than integer math as it avoids |
perform better than integer math as it avoids |
1123 |
an extra integer multiply instruction. |
an extra integer multiply instruction. |
|
|
|
1124 |
diharmonic: |
diharmonic: |
1125 |
The triangular wave will be approximated by adding two |
The triangular wave will be approximated by adding two |
1126 |
sinusoidials. This solution might especially hurt on |
sinusoidials. This solution might especially hurt on |
1151 |
will not discard notes, triggered in mute mode, |
will not discard notes, triggered in mute mode, |
1152 |
when the channel is unmuted. But also will reduce |
when the channel is unmuted. But also will reduce |
1153 |
the efficiency.], |
the efficiency.], |
1154 |
[config_process_muted_channels="yes"], |
[config_process_muted_channels="$enableval"], |
1155 |
[config_process_muted_channels="no"] |
[config_process_muted_channels="no"] |
1156 |
) |
) |
1157 |
if test "$config_process_muted_channels" = "yes"; then |
if test "$config_process_muted_channels" = "yes"; then |
1165 |
all voices whenever it receives an All-Notes-Off |
all voices whenever it receives an All-Notes-Off |
1166 |
MIDI message. You can disable this behavior, so |
MIDI message. You can disable this behavior, so |
1167 |
that LS simply ignores such messages.], |
that LS simply ignores such messages.], |
1168 |
[config_process_all_notes_off="no"], |
[config_process_all_notes_off="$enableval"], |
1169 |
[config_process_all_notes_off="yes"] |
[config_process_all_notes_off="yes"] |
1170 |
) |
) |
1171 |
if test "$config_process_all_notes_off" = "yes"; then |
if test "$config_process_all_notes_off" = "yes"; then |
1179 |
generated by for example the envelope generator |
generated by for example the envelope generator |
1180 |
will be smoother, minimizing the risk for audio |
will be smoother, minimizing the risk for audio |
1181 |
clicks. Disable it to reduce CPU usage.], |
clicks. Disable it to reduce CPU usage.], |
1182 |
[config_interpolate_volume="no"], |
[config_interpolate_volume="$enableval"], |
1183 |
[config_interpolate_volume="yes"] |
[config_interpolate_volume="yes"] |
1184 |
) |
) |
1185 |
if test "$config_interpolate_volume" = "yes"; then |
if test "$config_interpolate_volume" = "yes"; then |
1186 |
AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.]) |
AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.]) |
1187 |
fi |
fi |
1188 |
|
|
1189 |
|
AC_ARG_ENABLE(master-volume-sysex-by-port, |
1190 |
|
[ --enable-master-volume-sysex-by-port |
1191 |
|
Whether global volume sysex message should be |
1192 |
|
applied globally to the whole sampler or only to |
1193 |
|
the sampler channels connected to the same MIDI |
1194 |
|
input port on which the sysex message arrived on. |
1195 |
|
By default global volume sysex messages apply |
1196 |
|
globally to the whole sampler, since many MIDI |
1197 |
|
devices behave that way.], |
1198 |
|
[config_master_volume_sysex_by_port="$enableval"], |
1199 |
|
[config_master_volume_sysex_by_port="no"] |
1200 |
|
) |
1201 |
|
if test "$config_master_volume_sysex_by_port" = "yes"; then |
1202 |
|
AC_DEFINE_UNQUOTED(CONFIG_MASTER_VOLUME_SYSEX_BY_PORT, 1, [Define to 1 if you want global volume sysex message only be applied to the respective MIDI port.]) |
1203 |
|
fi |
1204 |
|
|
1205 |
|
AC_ARG_ENABLE(plugin-dir, |
1206 |
|
[ --enable-plugin-dir |
1207 |
|
Directory where the sampler shall look for potential plugins, |
1208 |
|
that is 3rd party shared libraries that should be loaded by |
1209 |
|
the sampler on startup. By default the sampler will search |
1210 |
|
for plugins in the subdirectory "plugins" below its own |
1211 |
|
library directory. |
1212 |
|
(i.e. /usr/local/lib/linuxsampler/plugins)], |
1213 |
|
[config_plugin_dir="${enableval}"], |
1214 |
|
[config_plugin_dir="${libdir}/linuxsampler/plugins"] |
1215 |
|
) |
1216 |
|
AC_SUBST(config_plugin_dir) |
1217 |
|
|
1218 |
|
AC_ARG_ENABLE(default-instruments-db-location, |
1219 |
|
[ --enable-default-instruments-db-location |
1220 |
|
Only when instruments DB feature is enabled: file name |
1221 |
|
which shall be taken as default location of the |
1222 |
|
instruments DB file. This location can still be |
1223 |
|
overridden at runtime with a command line switch. |
1224 |
|
(default: /var/lib/linuxsampler/instruments.db)], |
1225 |
|
[config_default_instruments_db_file="${enableval}"], |
1226 |
|
[config_default_instruments_db_file="/var/lib/linuxsampler/instruments.db"] |
1227 |
|
) |
1228 |
|
AC_DEFINE_UNQUOTED( |
1229 |
|
CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION, |
1230 |
|
"$config_default_instruments_db_file", |
1231 |
|
[Only when instruments DB feature is enabled: default location of the DB file.] |
1232 |
|
) |
1233 |
|
AC_SUBST(config_default_instruments_db_file) |
1234 |
|
|
1235 |
|
|
1236 |
########################################################################### |
########################################################################### |
1237 |
# Automatic Benchmarks (to detect the best algorithms for the system) |
# Automatic Benchmarks (to detect the best algorithms for the system) |
1238 |
|
|
|
AC_LANG_SAVE |
|
|
|
|
1239 |
if test "$config_signed_triang_algo" = "benchmark"; then |
if test "$config_signed_triang_algo" = "benchmark"; then |
1240 |
echo -n "benchmarking for the best (signed) triangular oscillator algorithm... " |
echo -n "benchmarking for the best (signed) triangular oscillator algorithm... " |
1241 |
AC_LANG_CPLUSPLUS |
AC_LANG_PUSH([C++]) |
1242 |
AC_TRY_RUN([ |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
1243 |
#define SIGNED 1 |
#define SIGNED 1 |
1244 |
#define SILENT 1 |
#define SILENT 1 |
1245 |
#include "${srcdir}/benchmarks/triang.cpp" |
#include "${srcdir}/benchmarks/triang.cpp" |
1246 |
], |
]])], |
1247 |
triang_signed=0, |
triang_signed=0, |
1248 |
triang_signed=$?, |
triang_signed=$?, |
1249 |
triang_signed=0 |
triang_signed=0 |
1250 |
) |
) |
1251 |
|
AC_LANG_POP([C++]) |
1252 |
if test "$triang_signed" = "2"; then |
if test "$triang_signed" = "2"; then |
1253 |
config_signed_triang_algo="intmath" |
config_signed_triang_algo="intmath" |
1254 |
echo "integer math" |
echo "integer math" |
1265 |
echo "Call './configure --help' for further information or read configure.in." |
echo "Call './configure --help' for further information or read configure.in." |
1266 |
exit -1; |
exit -1; |
1267 |
fi |
fi |
1268 |
|
else |
1269 |
|
case "$config_signed_triang_algo" in |
1270 |
|
intmath) |
1271 |
|
triang_signed=2 ;; |
1272 |
|
diharmonic) |
1273 |
|
triang_signed=3 ;; |
1274 |
|
intmathabs) |
1275 |
|
triang_signed=5 ;; |
1276 |
|
esac |
1277 |
fi |
fi |
1278 |
AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.]) |
AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.]) |
1279 |
|
|
1280 |
if test "$config_unsigned_triang_algo" = "benchmark"; then |
if test "$config_unsigned_triang_algo" = "benchmark"; then |
1281 |
echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... " |
echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... " |
1282 |
AC_LANG_CPLUSPLUS |
AC_LANG_PUSH([C++]) |
1283 |
AC_TRY_RUN([ |
AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
1284 |
#define SIGNED 0 |
#define SIGNED 0 |
1285 |
#define SILENT 1 |
#define SILENT 1 |
1286 |
#include "${srcdir}/benchmarks/triang.cpp" |
#include "${srcdir}/benchmarks/triang.cpp" |
1287 |
], |
]])], |
1288 |
triang_unsigned=0, |
triang_unsigned=0, |
1289 |
triang_unsigned=$?, |
triang_unsigned=$?, |
1290 |
triang_unsigned=0 |
triang_unsigned=0 |
1291 |
) |
) |
1292 |
|
AC_LANG_POP([C++]) |
1293 |
if test "$triang_unsigned" = "2"; then |
if test "$triang_unsigned" = "2"; then |
1294 |
config_unsigned_triang_algo="intmath" |
config_unsigned_triang_algo="intmath" |
1295 |
echo "integer math" |
echo "integer math" |
1306 |
echo "Call './configure --help' for further information or read configure.in." |
echo "Call './configure --help' for further information or read configure.in." |
1307 |
exit -1; |
exit -1; |
1308 |
fi |
fi |
1309 |
|
else |
1310 |
|
case "$config_unsigned_triang_algo" in |
1311 |
|
intmath) |
1312 |
|
triang_unsigned=2 ;; |
1313 |
|
diharmonic) |
1314 |
|
triang_unsigned=3 ;; |
1315 |
|
intmathabs) |
1316 |
|
triang_unsigned=5 ;; |
1317 |
|
esac |
1318 |
fi |
fi |
1319 |
AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.]) |
AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.]) |
1320 |
|
|
|
AC_LANG_RESTORE |
|
|
|
|
1321 |
|
|
1322 |
########################################################################### |
########################################################################### |
1323 |
# Create Build Files |
# Create Build Files |
1324 |
|
|
1325 |
AM_CONFIG_HEADER(config.h) |
AC_CONFIG_HEADERS([config.h]) |
1326 |
AM_INIT_AUTOMAKE(linuxsampler, "$LINUXSAMPLER_RELEASE_MAJOR.$LINUXSAMPLER_RELEASE_MINOR.$LINUXSAMPLER_RELEASE_BUILD") |
AM_INIT_AUTOMAKE([subdir-objects]) |
|
|
|
|
AC_LANG_CPLUSPLUS |
|
|
AC_PROG_CXX |
|
1327 |
|
|
1328 |
# some gcc 4.0 versions need -msse for SSE register allocations |
AC_LANG([C++]) |
|
if test "$config_asm" = "yes"; then |
|
|
if test "$def_arch_x86" = 1; then |
|
|
CXXFLAGS="$CXXFLAGS -msse" |
|
|
fi |
|
|
fi |
|
1329 |
|
|
1330 |
# autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like |
# autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like |
1331 |
# this, the dlfcn.h check in am_prog_libtool may fail. |
# this, the dlfcn.h check in am_prog_libtool may fail. |
1332 |
AC_CHECK_HEADER(stdlib.h) |
AC_CHECK_HEADER(stdlib.h) |
1333 |
|
|
1334 |
AC_OUTPUT( \ |
AC_CONFIG_FILES([\ |
1335 |
Makefile \ |
Makefile \ |
1336 |
man/Makefile \ |
man/Makefile \ |
1337 |
man/linuxsampler.1 \ |
man/linuxsampler.1 \ |
1338 |
|
man/lscp.1 \ |
1339 |
src/Makefile \ |
src/Makefile \ |
1340 |
|
src/db/Makefile \ |
1341 |
src/network/Makefile \ |
src/network/Makefile \ |
1342 |
src/engines/Makefile \ |
src/engines/Makefile \ |
1343 |
src/engines/gig/Makefile \ |
src/engines/gig/Makefile \ |
1344 |
|
src/engines/sf2/Makefile \ |
1345 |
|
src/engines/sfz/Makefile \ |
1346 |
src/engines/common/Makefile \ |
src/engines/common/Makefile \ |
1347 |
src/common/Makefile src/lib/Makefile \ |
src/effects/Makefile \ |
1348 |
src/lib/fileloader/Makefile \ |
src/common/Makefile \ |
|
src/lib/fileloader/libgig/Makefile \ |
|
1349 |
src/testcases/Makefile \ |
src/testcases/Makefile \ |
1350 |
src/drivers/Makefile \ |
src/drivers/Makefile \ |
1351 |
src/drivers/audio/Makefile \ |
src/drivers/audio/Makefile \ |
1352 |
src/drivers/midi/Makefile \ |
src/drivers/midi/Makefile \ |
1353 |
|
src/plugins/Makefile \ |
1354 |
|
src/hostplugins/Makefile \ |
1355 |
|
src/hostplugins/dssi/Makefile \ |
1356 |
|
src/hostplugins/lv2/Makefile \ |
1357 |
|
src/hostplugins/lv2/manifest.ttl \ |
1358 |
|
src/hostplugins/vst/Makefile \ |
1359 |
|
src/hostplugins/au/Makefile \ |
1360 |
|
src/shell/Makefile \ |
1361 |
linuxsampler.spec \ |
linuxsampler.spec \ |
1362 |
debian/Makefile \ |
debian/Makefile \ |
1363 |
Artwork/Makefile \ |
Artwork/Makefile \ |
1364 |
scripts/Makefile \ |
scripts/Makefile \ |
1365 |
osx/Makefile \ |
osx/Makefile \ |
1366 |
osx/LinuxSampler.xcode/Makefile \ |
osx/linuxsampler.xcodeproj/Makefile \ |
1367 |
Documentation/Makefile \ |
Documentation/Makefile \ |
1368 |
Documentation/Engines/Makefile \ |
Documentation/Engines/Makefile \ |
1369 |
Documentation/Engines/gig/Makefile \ |
Documentation/Engines/gig/Makefile \ |
1370 |
linuxsampler.pc \ |
linuxsampler.pc \ |
1371 |
Doxyfile \ |
Doxyfile \ |
1372 |
) |
]) |
1373 |
|
AC_OUTPUT |
1374 |
|
|
1375 |
|
# resolve all nested variables in '${config_plugin_dir}' |
1376 |
|
# (merely for providing a human readable summary below) |
1377 |
|
while test $config_plugin_dir != `eval echo ${config_plugin_dir}` ; do |
1378 |
|
config_plugin_dir=`eval echo ${config_plugin_dir}` |
1379 |
|
done |
1380 |
|
|
1381 |
|
|
1382 |
########################################################################### |
########################################################################### |
1386 |
echo "#####################################################################" |
echo "#####################################################################" |
1387 |
echo "# LinuxSampler Configuration #" |
echo "# LinuxSampler Configuration #" |
1388 |
echo "#-------------------------------------------------------------------#" |
echo "#-------------------------------------------------------------------#" |
1389 |
|
echo "# Release Version: ${VERSION}" |
1390 |
|
echo "# LSCP Version: ${LSCP_RELEASE_MAJOR}.${LSCP_RELEASE_MINOR}" |
1391 |
|
echo "#-------------------------------------------------------------------" |
1392 |
echo "# Assembly Optimizations: ${config_asm}" |
echo "# Assembly Optimizations: ${config_asm}" |
1393 |
echo "# Development Mode: ${config_dev_mode}" |
echo "# Development Mode: ${config_dev_mode}" |
1394 |
echo "# Debug Level: ${config_debug_level}" |
echo "# Debug Level: ${config_debug_level}" |
1402 |
echo "# Minimum Stream Refill Size: ${config_stream_min_refill}" |
echo "# Minimum Stream Refill Size: ${config_stream_min_refill}" |
1403 |
echo "# Maximum Stream Refill Size: ${config_stream_max_refill}" |
echo "# Maximum Stream Refill Size: ${config_stream_max_refill}" |
1404 |
echo "# Stream Size: ${config_stream_size}" |
echo "# Stream Size: ${config_stream_size}" |
1405 |
echo "# Maximum Disk Streams: ${config_max_streams}" |
echo "# Default Maximum Disk Streams: ${config_max_streams}" |
1406 |
echo "# Maximum Voices: ${config_max_voices}" |
echo "# Default Maximum Voices: ${config_max_voices}" |
1407 |
echo "# Default Subfragment Size: ${config_subfragment_size}" |
echo "# Default Subfragment Size: ${config_subfragment_size}" |
1408 |
echo "# Global Volume Attenuation: ${config_global_attenuation}" |
echo "# Default Global Volume Attenuation: ${config_global_attenuation_default}" |
1409 |
echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}" |
echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}" |
1410 |
echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}" |
echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}" |
1411 |
echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}" |
echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}" |
1422 |
echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}" |
echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}" |
1423 |
echo "# Process Muted Channels: ${config_process_muted_channels}" |
echo "# Process Muted Channels: ${config_process_muted_channels}" |
1424 |
echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}" |
echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}" |
1425 |
|
echo "# Apply global volume SysEx by MIDI port: ${config_master_volume_sysex_by_port}" |
1426 |
echo "# Interpolate Volume: ${config_interpolate_volume}" |
echo "# Interpolate Volume: ${config_interpolate_volume}" |
1427 |
|
echo "# Instruments database support: ${config_instruments_db}" |
1428 |
|
if test "$config_instruments_db" = "yes"; then |
1429 |
|
echo "# Instruments DB default location: ${config_default_instruments_db_file}" |
1430 |
|
fi |
1431 |
|
echo "# Plugin Path: ${config_plugin_dir}" |
1432 |
|
echo "#-------------------------------------------------------------------" |
1433 |
|
echo "# MIDI Input Drivers:" |
1434 |
|
echo "# ALSA: ${config_have_alsa}, JACK: ${config_have_jack_midi}, CoreMIDI: ${config_have_coremidi}, MME: ${config_have_mme}, MidiShare: ${config_have_midishare}" |
1435 |
|
echo "#-------------------------------------------------------------------" |
1436 |
|
echo "# Audio Output Drivers:" |
1437 |
|
echo "# ALSA: ${config_have_alsa}, JACK: ${config_have_jack}, ARTS: ${config_have_arts}, CoreAudio: ${config_have_coreaudio}, ASIO: ${config_have_asio}" |
1438 |
|
echo "#-------------------------------------------------------------------" |
1439 |
|
echo "# Sampler Engines:" |
1440 |
|
echo "# GIG: yes, SF2: ${config_have_sf2}, SFZ: yes" |
1441 |
|
echo "#-------------------------------------------------------------------" |
1442 |
|
echo "# Effect plugin systems for internal effects:" |
1443 |
|
echo "# LADSPA: yes" |
1444 |
|
echo "#-------------------------------------------------------------------" |
1445 |
|
echo "# Building sampler as plugin for following host standards:" |
1446 |
|
echo "# DSSI: ${config_have_dssi}, LV2: ${config_have_lv2}, VST: ${config_have_vst}, AU: ${config_have_au}" |
1447 |
echo "#-------------------------------------------------------------------#" |
echo "#-------------------------------------------------------------------#" |
1448 |
echo "# Read './configure --help' or file 'configure.in' for details. #" |
echo "# Read './configure --help' or file 'configure.in' for details. #" |
1449 |
echo "#####################################################################" |
echo "#####################################################################" |