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.22, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.2.2.19, 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) |
35 |
[ac_libgig="$enableval"], |
[ac_libgig="$enableval"], |
36 |
[ac_libgig="yes"]) |
[ac_libgig="yes"]) |
37 |
|
|
38 |
|
# Enable debugger stack-trace option (assumes --enable-debug). |
39 |
|
AC_ARG_ENABLE(stacktrace, |
40 |
|
AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]), |
41 |
|
[ac_stacktrace="$enableval"]) |
42 |
|
|
43 |
|
|
44 |
# Standard installation base dirs. |
# Standard installation base dirs. |
45 |
ac_with_paths="/usr /usr/local" |
ac_with_paths="/usr /usr/local" |
46 |
|
|
47 |
# Some a-la-debian alternatives... |
# Some a-la-debian alternatives... |
48 |
for X in /usr/lib /usr/share; do |
for X in /usr/lib /usr/lib64 /usr/share; do |
49 |
for Y in qt qt4; do |
for Y in qt qt4; do |
50 |
if test -d $X/$Y/bin; then |
if test -d $X/$Y/bin; then |
51 |
ac_with_paths="$ac_with_paths $X/$Y" |
ac_with_paths="$ac_with_paths $X/$Y" |
112 |
|
|
113 |
# Check for proper Qt version. |
# Check for proper Qt version. |
114 |
AC_CACHE_CHECK([for Qt library version >= 4.1], |
AC_CACHE_CHECK([for Qt library version >= 4.1], |
115 |
ac_qtlib_version, [ |
ac_cv_qtversion, [ |
116 |
AC_TRY_LINK([#include "Qt/qglobal.h"], [ |
AC_TRY_LINK([#include "Qt/qglobal.h"], [ |
117 |
#if QT_VERSION < 0x040100 |
#if QT_VERSION < 0x040100 |
118 |
#error Qt library 4.1 or greater required. |
#error Qt library 4.1 or greater required. |
119 |
#endif |
#endif |
120 |
], |
], ac_cv_qtversion="yes", [ |
|
ac_qtlib_version="yes", [ |
|
121 |
echo "no; Qt 4.1 or greater is required" |
echo "no; Qt 4.1 or greater is required" |
122 |
exit |
exit |
123 |
]) |
]) |
147 |
fi |
fi |
148 |
AC_SUBST(ac_uic) |
AC_SUBST(ac_uic) |
149 |
|
|
150 |
|
# Check for Qt lupdate utility. |
151 |
|
AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path) |
152 |
|
if test "x$ac_lupdate" = "xno"; then |
153 |
|
AC_MSG_ERROR([lupdate $ac_errmsg]) |
154 |
|
fi |
155 |
|
AC_SUBST(ac_lupdate) |
156 |
|
|
157 |
|
# Check for Qt lrelease utility. |
158 |
|
AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path) |
159 |
|
if test "x$ac_release" = "xno"; then |
160 |
|
AC_MSG_ERROR([lrelease $ac_errmsg]) |
161 |
|
fi |
162 |
|
AC_SUBST(ac_lrelease) |
163 |
|
|
164 |
# Checks for libraries. |
# Checks for libraries. |
165 |
AC_CHECK_LIB(m, main) |
AC_CHECK_LIB(m, main) |
166 |
AC_CHECK_LIB(X11, main) |
AC_CHECK_LIB(X11, main) |
180 |
ac_libs="$ac_libs -llscp" |
ac_libs="$ac_libs -llscp" |
181 |
|
|
182 |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
183 |
ac_instrument_name, [ |
ac_cv_instrument_name, [ |
184 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
185 |
lscp_channel_info_t info; |
lscp_channel_info_t info; |
186 |
info.instrument_name = 0; |
info.instrument_name = 0; |
187 |
], ac_instrument_name="yes", ac_instrument_name="no") |
], ac_cv_instrument_name="yes", ac_cv_instrument_name="no") |
188 |
]) |
]) |
189 |
|
ac_instrument_name=$ac_cv_instrument_name |
190 |
if test "x$ac_instrument_name" = "xyes"; then |
if test "x$ac_instrument_name" = "xyes"; then |
191 |
AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.]) |
AC_DEFINE(CONFIG_INSTRUMENT_NAME, 1, [Define if instrument_name is available.]) |
192 |
fi |
fi |
193 |
|
|
194 |
AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t], |
AC_CACHE_CHECK([for mute/solo in lscp_channel_info_t], |
195 |
ac_mute_solo, [ |
ac_cv_mute_solo, [ |
196 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
197 |
lscp_channel_info_t info; |
lscp_channel_info_t info; |
198 |
info.mute = 0; |
info.mute = 0; |
199 |
info.solo = 0; |
info.solo = 0; |
200 |
], ac_mute_solo="yes", ac_mute_solo="no") |
], ac_cv_mute_solo="yes", ac_cv_mute_solo="no") |
201 |
]) |
]) |
202 |
|
ac_mute_solo=$ac_cv_mute_solo |
203 |
if test "x$ac_mute_solo" = "xyes"; then |
if test "x$ac_mute_solo" = "xyes"; then |
204 |
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"]) |
205 |
fi |
fi |
219 |
if test "x$ac_fxsend" = "xyes"; then |
if test "x$ac_fxsend" = "xyes"; then |
220 |
AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.]) |
AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.]) |
221 |
AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t], |
AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t], |
222 |
ac_fxsend_level, [ |
ac_cv_fxsend_level, [ |
223 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
224 |
lscp_fxsend_info_t info; |
lscp_fxsend_info_t info; |
225 |
info.level = 0.0f; |
info.level = 0.0f; |
226 |
], ac_fxsend_level="yes", ac_fxsend_level="no") |
], ac_cv_fxsend_level="yes", ac_cv_fxsend_level="no") |
227 |
]) |
]) |
228 |
|
ac_fxsend_level=$ac_cv_fxsend_level |
229 |
if test "x$ac_fxsend_level" = "xyes"; then |
if test "x$ac_fxsend_level" = "xyes"; then |
230 |
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.]) |
231 |
fi |
fi |
236 |
fi |
fi |
237 |
|
|
238 |
AC_CACHE_CHECK([for audio_routing array type], |
AC_CACHE_CHECK([for audio_routing array type], |
239 |
ac_audio_routing, [ |
ac_cv_audio_routing, [ |
240 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
241 |
lscp_channel_info_t info; |
lscp_channel_info_t info; |
242 |
char ch = info.audio_routing[0][0]; |
char ch = info.audio_routing[0][0]; |
243 |
], ac_audio_routing="no", ac_audio_routing="yes") |
], ac_cv_audio_routing="no", ac_cv_audio_routing="yes") |
244 |
]) |
]) |
245 |
|
ac_audio_routing=$ac_cv_audio_routing |
246 |
if test "x$ac_audio_routing" = "xyes"; then |
if test "x$ac_audio_routing" = "xyes"; then |
247 |
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.]) |
248 |
fi |
fi |
258 |
fi |
fi |
259 |
|
|
260 |
AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp], |
AC_CACHE_CHECK([for CHANNEL_MIDI LSCP event support in liblscp], |
261 |
ac_lscp_channel_midi_event, [ |
ac_cv_channel_midi_event, [ |
262 |
AC_TRY_COMPILE([ |
AC_TRY_COMPILE([ |
263 |
#include "lscp/client.h" |
#include "lscp/client.h" |
264 |
#include "lscp/event.h" |
#include "lscp/event.h" |
265 |
], [ |
], [ |
266 |
lscp_event_t ev; |
lscp_event_t ev; |
267 |
ev = LSCP_EVENT_CHANNEL_MIDI; |
ev = LSCP_EVENT_CHANNEL_MIDI; |
268 |
], ac_lscp_channel_midi_event="yes", ac_lscp_channel_midi_event="no") |
], ac_cv_channel_midi_event="yes", ac_cv_channel_midi_event="no") |
269 |
]) |
]) |
270 |
if test "x$ac_lscp_channel_midi_event" = "xyes"; then |
ac_channel_midi_event=$ac_cv_channel_midi_event |
271 |
|
if test "x$ac_channel_midi_event" = "xyes"; then |
272 |
AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.]) |
AC_DEFINE(CONFIG_EVENT_CHANNEL_MIDI, 1, [Define if LSCP CHANNEL_MIDI event support is available.]) |
273 |
fi |
fi |
274 |
|
|
275 |
AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp], |
AC_CACHE_CHECK([for DEVICE_MIDI LSCP event support in liblscp], |
276 |
ac_lscp_device_midi_event, [ |
ac_cv_device_midi_event, [ |
277 |
AC_TRY_COMPILE([ |
AC_TRY_COMPILE([ |
278 |
#include "lscp/client.h" |
#include "lscp/client.h" |
279 |
#include "lscp/event.h" |
#include "lscp/event.h" |
280 |
], [ |
], [ |
281 |
lscp_event_t ev; |
lscp_event_t ev; |
282 |
ev = LSCP_EVENT_DEVICE_MIDI; |
ev = LSCP_EVENT_DEVICE_MIDI; |
283 |
], ac_lscp_device_midi_event="yes", ac_lscp_device_midi_event="no") |
], ac_cv_device_midi_event="yes", ac_cv_device_midi_event="no") |
284 |
]) |
]) |
285 |
if test "x$ac_lscp_device_midi_event" = "xyes"; then |
ac_device_midi_event=$ac_cv_device_midi_event |
286 |
|
if test "x$ac_device_midi_event" = "xyes"; then |
287 |
AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.]) |
AC_DEFINE(CONFIG_EVENT_DEVICE_MIDI, 1, [Define if LSCP DEVICE_MIDI event support is available.]) |
288 |
fi |
fi |
289 |
|
|
329 |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
330 |
fi |
fi |
331 |
|
|
332 |
|
# Check for debugging stack-trace. |
333 |
|
if test "x$ac_stacktrace" = "xyes"; then |
334 |
|
AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) |
335 |
|
fi |
336 |
|
|
337 |
AC_SUBST(ac_libs) |
AC_SUBST(ac_libs) |
338 |
AC_SUBST(ac_incpath) |
AC_SUBST(ac_incpath) |
339 |
|
|
378 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
379 |
echo " libgig supports fast information retrieval . . . .: $have_libgig_setautoload" |
echo " libgig supports fast information retrieval . . . .: $have_libgig_setautoload" |
380 |
fi |
fi |
381 |
echo " LSCP channel MIDI event support . . . . . . . . .: $ac_lscp_channel_midi_event" |
echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event" |
382 |
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_lscp_device_midi_event" |
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" |
383 |
echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" |
echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" |
384 |
echo |
echo |
385 |
|
echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" |
386 |
|
echo |
387 |
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
388 |
echo |
echo |
389 |
echo "Now type 'make', followed by 'make install' as root." |
echo "Now type 'make', followed by 'make install' as root." |