8 |
AC_SUBST(target_os) |
AC_SUBST(target_os) |
9 |
AC_SUBST(target_vendor) |
AC_SUBST(target_vendor) |
10 |
|
|
11 |
|
|
12 |
|
|
13 |
echo -n "checking whether x86 architecture... " |
echo -n "checking whether x86 architecture... " |
14 |
def_arch_x86=0 |
def_arch_x86=0 |
15 |
case $target_cpu in |
case $target_cpu in |
22 |
AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.]) |
AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.]) |
23 |
|
|
24 |
|
|
25 |
|
AC_MSG_CHECKING([whether UNIX98 compatible]) |
26 |
|
AC_LANG_SAVE |
27 |
|
AC_LANG_C |
28 |
|
AC_TRY_RUN([ |
29 |
|
#ifndef _GNU_SOURCE |
30 |
|
#define _GNU_SOURCE 1 |
31 |
|
#endif |
32 |
|
#include <features.h> |
33 |
|
void main(void) { |
34 |
|
#if _XOPEN_SOURCE >= 500 |
35 |
|
exit(0); /* UNIX98 compatible */ |
36 |
|
#else |
37 |
|
exit(-1); /* not UNIX98 compatible */ |
38 |
|
#endif |
39 |
|
} |
40 |
|
], |
41 |
|
have_unix98="yes", |
42 |
|
have_unix98="no", |
43 |
|
have_unix98="no" |
44 |
|
) |
45 |
|
AC_LANG_RESTORE |
46 |
|
AC_MSG_RESULT([$have_unix98]) |
47 |
|
if test "$have_unix98" = "no"; then |
48 |
|
if test "x$HAVE_UNIX98" = "x"; then |
49 |
|
echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for" |
50 |
|
echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run |
51 |
|
echo "./configure with environment variable HAVE_UNIX98=1 in case you think you |
52 |
|
echo "have a UNIX98 compatible system." |
53 |
|
exit -1; |
54 |
|
fi |
55 |
|
fi |
56 |
|
|
57 |
|
|
58 |
|
# Checks for available audio and MIDI systems / drivers |
59 |
|
# (we throw an error if there's not at least one system for audio output and MIDI input available) |
60 |
|
have_midi_input_driver="false" |
61 |
|
have_audio_output_driver="false" |
62 |
|
|
63 |
AC_CHECK_HEADER(alsa/asoundlib.h, |
AC_CHECK_HEADER(alsa/asoundlib.h, |
64 |
AC_CHECK_LIB(asound, main, |
AC_CHECK_LIB(asound, main, |
65 |
have_alsa="true" |
have_alsa=1 |
66 |
, |
, |
67 |
have_alsa="false" |
have_alsa=0 |
68 |
) |
) |
69 |
, |
, |
70 |
have_alsa="false" |
have_alsa=0 |
71 |
) |
) |
72 |
if test "$have_alsa" = "false"; then |
if test "$have_alsa" = "1"; then |
73 |
echo "Alsa not installed!" |
have_midi_input_driver="true" |
74 |
echo "Sorry, LinuxSampler only supports Alsa sound drivers at the moment!" |
have_audio_output_driver="true"; |
|
exit -1; |
|
75 |
fi |
fi |
76 |
|
AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1") |
77 |
|
AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.]) |
78 |
|
|
79 |
|
|
80 |
echo -n "checking Alsa version... " |
echo -n "checking Alsa version... " |
136 |
if test $HAVE_JACK = false; then |
if test $HAVE_JACK = false; then |
137 |
HAVE_JACK=0; |
HAVE_JACK=0; |
138 |
else |
else |
139 |
HAVE_JACK=1; |
HAVE_JACK=1 |
140 |
|
have_audio_output_driver="true"; |
141 |
fi |
fi |
142 |
|
AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1) |
143 |
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.]) |
144 |
|
|
145 |
|
|
146 |
|
if test "$have_midi_input_driver" = "false"; then |
147 |
|
echo "No supported MIDI input system found!" |
148 |
|
echo "Sorry, LinuxSampler only supports ALSA as MIDI input driver at the moment!" |
149 |
|
exit -1; |
150 |
|
fi |
151 |
|
if test "$have_audio_output_driver" = "false"; then |
152 |
|
echo "No supported audio output system found!" |
153 |
|
echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!" |
154 |
|
exit -1; |
155 |
|
fi |
156 |
|
|
157 |
|
|
158 |
AM_CONFIG_HEADER(config.h) |
AM_CONFIG_HEADER(config.h) |
159 |
AM_INIT_AUTOMAKE(linuxsampler, 0.2) |
AM_INIT_AUTOMAKE(linuxsampler, 0.2) |
160 |
|
|