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.2.4, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.2.2.35, 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 |
|
if test "$cross_compiling" != yes; then |
45 |
# Standard installation base dirs. |
# Standard installation base dirs. |
46 |
ac_with_paths="/usr /usr/local" |
ac_with_paths="/usr /usr/local" |
47 |
|
|
53 |
fi |
fi |
54 |
done |
done |
55 |
done |
done |
56 |
|
fi |
57 |
|
|
58 |
# Set for alternate Qt installation dir. |
# Set for alternate Qt installation dir. |
59 |
AC_ARG_WITH(qt, |
AC_ARG_WITH(qt, |
113 |
done |
done |
114 |
|
|
115 |
# Check for proper Qt version. |
# Check for proper Qt version. |
116 |
AC_CACHE_CHECK([for Qt library version >= 4.1], |
AC_CACHE_CHECK([for Qt library version >= 4.2], |
117 |
ac_cv_qtversion, [ |
ac_cv_qtversion, [ |
118 |
AC_TRY_LINK([#include "Qt/qglobal.h"], [ |
AC_TRY_LINK([#include "QtCore/qglobal.h"], [ |
119 |
#if QT_VERSION < 0x040100 |
#if QT_VERSION < 0x040200 |
120 |
#error Qt library 4.1 or greater required. |
#error Qt library 4.2 or greater required. |
121 |
#endif |
#endif |
122 |
], ac_cv_qtversion="yes", [ |
], ac_cv_qtversion="yes", [ |
123 |
echo "no; Qt 4.1 or greater is required" |
echo "no; Qt 4.2 or greater is required" |
124 |
exit |
exit |
125 |
]) |
]) |
126 |
]) |
]) |
180 |
AC_MSG_ERROR([LSCP library not found.]) |
AC_MSG_ERROR([LSCP library not found.]) |
181 |
fi |
fi |
182 |
ac_libs="$ac_libs -llscp" |
ac_libs="$ac_libs -llscp" |
183 |
|
case "{$host}" in |
184 |
|
*mingw*) |
185 |
|
ac_libs="$ac_libs -lws2_32" |
186 |
|
LIBS="$LIBS -lws2_32" |
187 |
|
;; |
188 |
|
esac |
189 |
|
|
190 |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
191 |
ac_cv_instrument_name, [ |
ac_cv_instrument_name, [ |
310 |
AC_LANG_SAVE |
AC_LANG_SAVE |
311 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
312 |
CXXFLAGS="$ac_libs" |
CXXFLAGS="$ac_libs" |
313 |
AC_TRY_RUN([ |
AC_TRY_COMPILE([ |
314 |
#include <stdlib.h> |
#include <stdlib.h> |
315 |
#include <gig.h> |
#include <gig.h> |
316 |
int main() { |
],[ |
317 |
gig::File file; |
gig::File file; |
318 |
file.SetAutoLoad(false); |
file.SetAutoLoad(false); |
|
exit(0); |
|
|
} |
|
319 |
], |
], |
320 |
have_libgig_setautoload="yes", |
have_libgig_setautoload="yes", |
|
have_libgig_setautoload="no", |
|
321 |
have_libgig_setautoload="no" |
have_libgig_setautoload="no" |
322 |
) |
) |
323 |
AC_LANG_RESTORE |
AC_LANG_RESTORE |
334 |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
335 |
fi |
fi |
336 |
|
|
337 |
|
# Check for debugging stack-trace. |
338 |
|
if test "x$ac_stacktrace" = "xyes"; then |
339 |
|
AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) |
340 |
|
fi |
341 |
|
|
342 |
|
# Some recent distros (eg. fedora, debian) require this. |
343 |
|
if test "x$ac_cv_lib_X11_main" = "xyes"; then |
344 |
|
ac_libs="$ac_libs -lX11" |
345 |
|
fi |
346 |
|
|
347 |
AC_SUBST(ac_libs) |
AC_SUBST(ac_libs) |
348 |
AC_SUBST(ac_incpath) |
AC_SUBST(ac_incpath) |
349 |
|
|
350 |
# Checks for header files. |
# Checks for header files. |
351 |
AC_HEADER_STDC |
AC_HEADER_STDC |
352 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
353 |
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) |
354 |
|
|
355 |
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"]) |
356 |
if test "x$ac_lscp_h" = "xno"; then |
if test "x$ac_lscp_h" = "xno"; then |
392 |
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" |
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" |
393 |
echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" |
echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" |
394 |
echo |
echo |
395 |
|
echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" |
396 |
|
echo |
397 |
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
398 |
echo |
echo |
399 |
echo "Now type 'make', followed by 'make install' as root." |
echo "Now type 'make', followed by 'make install' as root." |