1 |
# Process this file with autoconf to produce a configure script. |
# Process this file with autoconf to produce a configure script. |
2 |
AC_INIT(Qsampler, 0.2.1.6, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.2.3, rncbc@rncbc.org, qsampler) |
3 |
|
|
4 |
AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui) |
AC_CONFIG_SRCDIR(src/qsampler.cpp) |
5 |
AC_CONFIG_HEADERS(config.h) |
AC_CONFIG_HEADERS(src/config.h) |
6 |
AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec qsampler.desktop) |
AC_CONFIG_FILES(Makefile qsampler.spec src/src.pri src/qsampler.desktop) |
7 |
|
|
8 |
# Set default installation prefix. |
# Set default installation prefix. |
9 |
AC_PREFIX_DEFAULT(/usr/local) |
AC_PREFIX_DEFAULT(/usr/local) |
21 |
|
|
22 |
if test "x$ac_debug" = "xyes"; then |
if test "x$ac_debug" = "xyes"; then |
23 |
AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) |
AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) |
24 |
|
ac_stacktrace="yes" |
25 |
ac_debug="debug" |
ac_debug="debug" |
26 |
else |
else |
27 |
|
ac_stacktrace="no" |
28 |
ac_debug="release" |
ac_debug="release" |
29 |
fi |
fi |
30 |
AC_SUBST(ac_debug) |
AC_SUBST(ac_debug) |
31 |
|
|
32 |
|
|
33 |
|
# Enable Qt4/5 availability. |
34 |
|
AC_ARG_ENABLE(qt4, |
35 |
|
AC_HELP_STRING([--enable-qt4], [enable Qt4 build (default=yes)]), |
36 |
|
[ac_qt4="$enableval"], |
37 |
|
[ac_qt4="yes"]) |
38 |
|
|
39 |
|
AC_ARG_ENABLE(qt5, |
40 |
|
AC_HELP_STRING([--enable-qt5], [enable Qt5 build (default=no)]), |
41 |
|
[ac_qt5="$enableval"], |
42 |
|
[ac_qt5="no"]) |
43 |
|
|
44 |
|
if test "x$ac_qt4" = "xno"; then |
45 |
|
ac_qt5="yes" |
46 |
|
fi |
47 |
|
if test "x$ac_qt5" = "xyes"; then |
48 |
|
ac_qt4="no" |
49 |
|
fi |
50 |
|
|
51 |
# Enable libgig availability. |
# Enable libgig availability. |
52 |
AC_ARG_ENABLE(libgig, |
AC_ARG_ENABLE(libgig, |
53 |
AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), |
AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), |
54 |
[ac_libgig="$enableval"], |
[ac_libgig="$enableval"], |
55 |
[ac_libgig="yes"]) |
[ac_libgig="yes"]) |
56 |
|
|
57 |
|
# Enable debugger stack-trace option (assumes --enable-debug). |
58 |
|
AC_ARG_ENABLE(stacktrace, |
59 |
|
AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]), |
60 |
|
[ac_stacktrace="$enableval"]) |
61 |
|
|
62 |
|
|
63 |
|
if test "$cross_compiling" != yes; then |
64 |
# Standard installation base dirs. |
# Standard installation base dirs. |
65 |
ac_with_paths="/usr /usr/local" |
ac_with_paths="/usr /usr/local" |
66 |
|
|
67 |
|
ac_qtdirs="qt" |
68 |
|
|
69 |
|
if test "x$ac_qt4" = "xyes"; then |
70 |
|
ac_qtdirs="qt4 $ac_qtdirs" |
71 |
|
fi |
72 |
|
if test "x$ac_qt5" = "xyes"; then |
73 |
|
ac_qtdirs="qt5 $ac_qtdirs" |
74 |
|
fi |
75 |
|
|
76 |
# Some a-la-debian alternatives... |
# Some a-la-debian alternatives... |
77 |
for X in /usr/lib /usr/share; do |
for X in /usr/lib /usr/lib64 /usr/share; do |
78 |
for Y in qt qt4; do |
for Y in $ac_qtdirs; do |
79 |
if test -d $X/$Y/bin; then |
if test -d $X/$Y/bin; then |
80 |
ac_with_paths="$ac_with_paths $X/$Y" |
ac_with_paths="$ac_with_paths $X/$Y" |
81 |
fi |
fi |
82 |
done |
done |
83 |
done |
done |
84 |
|
fi |
85 |
|
|
86 |
# Set for alternate Qt installation dir. |
# Set for alternate Qt installation dir. |
87 |
AC_ARG_WITH(qt, |
AC_ARG_WITH(qt, |
115 |
if test -d $X/bin; then |
if test -d $X/bin; then |
116 |
ac_path="$X/bin:$ac_path" |
ac_path="$X/bin:$ac_path" |
117 |
fi |
fi |
118 |
if test -x $X/qmake; then |
# if test -x $X/qmake; then |
119 |
ac_path="$X:$ac_path" |
# ac_path="$X:$ac_path" |
120 |
fi |
# fi |
121 |
if test -d $X/include; then |
if test -d $X/include; then |
122 |
for Y in qt qt4; do |
for Y in $ac_qtdirs; do |
123 |
if test -d $X/include/$Y; then |
if test -d $X/include/$Y; then |
124 |
CFLAGS="-I$X/include/$Y $CFLAGS" |
CFLAGS="-I$X/include/$Y $CFLAGS" |
125 |
CPPFLAGS="-I$X/include/$Y $CPPFLAGS" |
CPPFLAGS="-I$X/include/$Y $CPPFLAGS" |
140 |
fi |
fi |
141 |
done |
done |
142 |
|
|
143 |
|
# Check for proper flags. |
144 |
|
ac_arch=`uname -m` |
145 |
|
if test "x$ac_arch" = "xx86_64"; then |
146 |
|
CFLAGS="-fPIC $CFLAGS" |
147 |
|
CPPFLAGS="-fPIC $CPPFLAGS" |
148 |
|
fi |
149 |
|
|
150 |
# Check for proper Qt version. |
# Check for proper Qt version. |
151 |
AC_CACHE_CHECK([for Qt library version >= 4.1], |
AC_CACHE_CHECK([for Qt library version >= 4.4], |
152 |
ac_qtlib_version, [ |
ac_cv_qtversion, [ |
153 |
AC_TRY_LINK([#include "Qt/qglobal.h"], [ |
AC_TRY_LINK([#include "QtCore/qglobal.h"], [ |
154 |
#if QT_VERSION < 0x040100 |
#if QT_VERSION < 0x040400 |
155 |
#error Qt library 4.1 or greater required. |
#error Qt library 4.4 or greater required. |
156 |
#endif |
#endif |
157 |
], |
], ac_cv_qtversion="yes", [ |
158 |
ac_qtlib_version="yes", [ |
echo "no; Qt 4.4 or greater is required" |
|
echo "no; Qt 4.1 or greater is required" |
|
159 |
exit |
exit |
160 |
]) |
]) |
161 |
]) |
]) |
184 |
fi |
fi |
185 |
AC_SUBST(ac_uic) |
AC_SUBST(ac_uic) |
186 |
|
|
187 |
|
# Check for Qt lupdate utility. |
188 |
|
AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path) |
189 |
|
if test "x$ac_lupdate" = "xno"; then |
190 |
|
AC_MSG_ERROR([lupdate $ac_errmsg]) |
191 |
|
fi |
192 |
|
AC_SUBST(ac_lupdate) |
193 |
|
|
194 |
|
# Check for Qt lrelease utility. |
195 |
|
AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path) |
196 |
|
if test "x$ac_release" = "xno"; then |
197 |
|
AC_MSG_ERROR([lrelease $ac_errmsg]) |
198 |
|
fi |
199 |
|
AC_SUBST(ac_lrelease) |
200 |
|
|
201 |
# Checks for libraries. |
# Checks for libraries. |
202 |
AC_CHECK_LIB(m, main) |
AC_CHECK_LIB(m, main) |
203 |
AC_CHECK_LIB(X11, main) |
AC_CHECK_LIB(X11, main) |
215 |
AC_MSG_ERROR([LSCP library not found.]) |
AC_MSG_ERROR([LSCP library not found.]) |
216 |
fi |
fi |
217 |
ac_libs="$ac_libs -llscp" |
ac_libs="$ac_libs -llscp" |
218 |
|
case "{$host}" in |
219 |
|
*mingw*) |
220 |
|
ac_libs="$ac_libs -lws2_32" |
221 |
|
LIBS="$LIBS -lws2_32" |
222 |
|
;; |
223 |
|
esac |
224 |
|
|
225 |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
226 |
ac_instrument_name, [ |
ac_cv_instrument_name, [ |
227 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
228 |
lscp_channel_info_t info; |
lscp_channel_info_t info; |
229 |
info.instrument_name = 0; |
info.instrument_name = 0; |
230 |
], ac_instrument_name="yes", ac_instrument_name="no") |
], ac_cv_instrument_name="yes", ac_cv_instrument_name="no") |
231 |
]) |
]) |
232 |
|
ac_instrument_name=$ac_cv_instrument_name |
233 |
if test "x$ac_instrument_name" = "xyes"; then |
if test "x$ac_instrument_name" = "xyes"; then |
234 |
AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.]) |
AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.]) |
235 |
fi |
fi |
236 |
|
|
237 |
AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t], |
AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t], |
238 |
ac_mute_solo, [ |
ac_cv_mute_solo, [ |
239 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
240 |
lscp_channel_info_t info; |
lscp_channel_info_t info; |
241 |
info.mute = 0; |
info.mute = 0; |
242 |
info.solo = 0; |
info.solo = 0; |
243 |
], ac_mute_solo="yes", ac_mute_solo="no") |
], ac_cv_mute_solo="yes", ac_cv_mute_solo="no") |
244 |
]) |
]) |
245 |
|
ac_mute_solo=$ac_cv_mute_solo |
246 |
if test "x$ac_mute_solo" = "xyes"; then |
if test "x$ac_mute_solo" = "xyes"; then |
247 |
AC_CHECK_LIB(lscp, lscp_set_channel_mute, [ac_mute_solo="yes"], [ac_mute_solo="no"]) |
AC_CHECK_LIB(lscp, lscp_set_channel_mute, [ac_mute_solo="yes"], [ac_mute_solo="no"]) |
248 |
fi |
fi |
262 |
if test "x$ac_fxsend" = "xyes"; then |
if test "x$ac_fxsend" = "xyes"; then |
263 |
AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.]) |
AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.]) |
264 |
AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t], |
AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t], |
265 |
ac_fxsend_level, [ |
ac_cv_fxsend_level, [ |
266 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
267 |
lscp_fxsend_info_t info; |
lscp_fxsend_info_t info; |
268 |
info.level = 0.0f; |
info.level = 0.0f; |
269 |
], ac_fxsend_level="yes", ac_fxsend_level="no") |
], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no") |
270 |
]) |
]) |
271 |
|
ac_fxsend_level=$ac_cv_fxsend_level |
272 |
if test "x$ac_fxsend_level" = "xyes"; then |
if test "x$ac_fxsend_level" = "xyes"; then |
273 |
AC_DEFINE(CONFIG_FXSEND_LEVEL, 1, [Define if FX send level is available.]) |
AC_DEFINE(CONFIG_FXSEND_LEVEL, 1, [Define if FX send level is available.]) |
274 |
fi |
fi |
279 |
fi |
fi |
280 |
|
|
281 |
AC_CACHE_CHECK([for audio_routing array type], |
AC_CACHE_CHECK([for audio_routing array type], |
282 |
ac_audio_routing, [ |
ac_cv_audio_routing, [ |
283 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
284 |
lscp_channel_info_t info; |
lscp_channel_info_t info; |
285 |
char ch = info.audio_routing[0][0]; |
char ch = info.audio_routing[0][0]; |
286 |
], ac_audio_routing="no", ac_audio_routing="yes") |
], ac_cv_audio_routing="no", ac_cv_audio_routing="yes") |
287 |
]) |
]) |
288 |
|
ac_audio_routing=$ac_cv_audio_routing |
289 |
if test "x$ac_audio_routing" = "xyes"; then |
if test "x$ac_audio_routing" = "xyes"; then |
290 |
AC_DEFINE(CONFIG_AUDIO_ROUTING, 1, [Define if audio_routing is an integer array.]) |
AC_DEFINE(CONFIG_AUDIO_ROUTING, 1, [Define if audio_routing is an integer array.]) |
291 |
fi |
fi |
301 |
fi |
fi |
302 |
|
|
303 |
AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp], |
AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp], |
304 |
ac_lscp_channel_midi_event, [ |
ac_cv_channel_midi_event, [ |
305 |
AC_TRY_COMPILE([ |
AC_TRY_COMPILE([ |
306 |
#include "lscp/client.h" |
#include "lscp/client.h" |
307 |
#include "lscp/event.h" |
#include "lscp/event.h" |
308 |
], [ |
], [ |
309 |
lscp_event_t ev; |
lscp_event_t ev; |
310 |
ev = LSCP_EVENT_CHANNEL_MIDI; |
ev = LSCP_EVENT_CHANNEL_MIDI; |
311 |
], ac_lscp_channel_midi_event="yes", ac_lscp_channel_midi_event="no") |
], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no") |
312 |
|
]) |
313 |
|
ac_channel_midi_event=$ac_cv_channel_midi_event |
314 |
|
if test "x$ac_channel_midi_event" = "xyes"; then |
315 |
|
AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.]) |
316 |
|
fi |
317 |
|
|
318 |
|
AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp], |
319 |
|
ac_cv_device_midi_event, [ |
320 |
|
AC_TRY_COMPILE([ |
321 |
|
#include "lscp/client.h" |
322 |
|
#include "lscp/event.h" |
323 |
|
], [ |
324 |
|
lscp_event_t ev; |
325 |
|
ev = LSCP_EVENT_DEVICE_MIDI; |
326 |
|
], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no") |
327 |
]) |
]) |
328 |
if test "x$ac_lscp_channel_midi_event" = "xyes"; then |
ac_device_midi_event=$ac_cv_device_midi_event |
329 |
AC_DEFINE(CONFIG_LSCP_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.]) |
if test "x$ac_device_midi_event" = "xyes"; then |
330 |
|
AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.]) |
331 |
|
fi |
332 |
|
|
333 |
|
AC_CHECK_LIB(lscp, lscp_get_voices, [ac_max_voices="yes"], [ac_max_voices="no"]) |
334 |
|
if test "x$ac_max_voices" = "xyes"; then |
335 |
|
AC_DEFINE(CONFIG_MAX_VOICES, 1, [Define if max. voices / streams is available.]) |
336 |
fi |
fi |
337 |
|
|
338 |
# Check for optional libraries. |
# Check for optional libraries. |
345 |
AC_LANG_SAVE |
AC_LANG_SAVE |
346 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
347 |
CXXFLAGS="$ac_libs" |
CXXFLAGS="$ac_libs" |
348 |
AC_TRY_RUN([ |
AC_TRY_COMPILE([ |
349 |
#include <stdlib.h> |
#include <stdlib.h> |
350 |
#include <gig.h> |
#include <gig.h> |
351 |
int main() { |
],[ |
352 |
gig::File file; |
gig::File file; |
353 |
file.SetAutoLoad(false); |
file.SetAutoLoad(false); |
|
exit(0); |
|
|
} |
|
354 |
], |
], |
355 |
have_libgig_setautoload="yes", |
have_libgig_setautoload="yes", |
|
have_libgig_setautoload="no", |
|
356 |
have_libgig_setautoload="no" |
have_libgig_setautoload="no" |
357 |
) |
) |
358 |
AC_LANG_RESTORE |
AC_LANG_RESTORE |
369 |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
370 |
fi |
fi |
371 |
|
|
372 |
|
# Check for debugging stack-trace. |
373 |
|
if test "x$ac_stacktrace" = "xyes"; then |
374 |
|
AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) |
375 |
|
fi |
376 |
|
|
377 |
|
# Some recent distros (eg. fedora, debian) require this. |
378 |
|
if test "x$ac_cv_lib_X11_main" = "xyes"; then |
379 |
|
ac_libs="$ac_libs -lX11" |
380 |
|
fi |
381 |
|
|
382 |
AC_SUBST(ac_libs) |
AC_SUBST(ac_libs) |
383 |
AC_SUBST(ac_incpath) |
AC_SUBST(ac_incpath) |
384 |
|
|
385 |
# Checks for header files. |
# Checks for header files. |
386 |
AC_HEADER_STDC |
AC_HEADER_STDC |
387 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
388 |
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h) |
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h sys/socket.h) |
389 |
|
|
390 |
AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"]) |
AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"]) |
391 |
if test "x$ac_lscp_h" = "xno"; then |
if test "x$ac_lscp_h" = "xno"; then |
423 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
424 |
echo " libgig supports fast information retrieval . . . .: $have_libgig_setautoload" |
echo " libgig supports fast information retrieval . . . .: $have_libgig_setautoload" |
425 |
fi |
fi |
426 |
echo " LSCP channel MIDI event support . . . . . . . . .: $ac_lscp_channel_midi_event" |
echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event" |
427 |
|
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" |
428 |
|
echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" |
429 |
|
echo |
430 |
|
echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" |
431 |
echo |
echo |
432 |
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
433 |
echo |
echo |