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.2, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.2.3.1, 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 |
|
|
52 |
# Enable libgig availability. |
# Enable libgig availability. |
53 |
AC_ARG_ENABLE(libgig, |
AC_ARG_ENABLE(libgig, |
54 |
AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), |
AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), |
55 |
[ac_libgig="$enableval"], |
[ac_libgig="$enableval"], |
56 |
[ac_libgig="yes"]) |
[ac_libgig="yes"]) |
57 |
|
|
58 |
|
# Enable debugger stack-trace option (assumes --enable-debug). |
59 |
|
AC_ARG_ENABLE(stacktrace, |
60 |
|
AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]), |
61 |
|
[ac_stacktrace="$enableval"]) |
62 |
|
|
63 |
|
|
64 |
# Standard installation base dirs. |
# Standard installation base dirs. |
65 |
ac_with_paths="/usr /usr/local" |
ac_with_paths="/usr /usr/local" |
66 |
|
|
|
# Some a-la-debian alternatives... |
|
|
for X in /usr/lib /usr/lib64 /usr/share; do |
|
|
for Y in qt qt4; do |
|
|
if test -d $X/$Y/bin; then |
|
|
ac_with_paths="$ac_with_paths $X/$Y" |
|
|
fi |
|
|
done |
|
|
done |
|
|
|
|
67 |
# Set for alternate Qt installation dir. |
# Set for alternate Qt installation dir. |
68 |
AC_ARG_WITH(qt, |
AC_ARG_WITH(qt, |
69 |
AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]), |
AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]), |
90 |
AC_LANG_C |
AC_LANG_C |
91 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
92 |
|
|
93 |
|
|
94 |
|
# Check for proper flags. |
95 |
|
ac_arch=`uname -m` |
96 |
|
|
97 |
|
# Check for some a-la-debian alternatives... |
98 |
|
ac_qtdirs="qt" |
99 |
|
|
100 |
|
if test "x$ac_qt4" = "xyes"; then |
101 |
|
ac_qtdirs="qt4 $ac_qtdirs" |
102 |
|
fi |
103 |
|
if test "x$ac_qt5" = "xyes"; then |
104 |
|
ac_qtdirs="qt5 $ac_qtdirs" |
105 |
|
fi |
106 |
|
|
107 |
|
ac_topdirs="/usr/share /usr/lib" |
108 |
|
|
109 |
|
if test "x$ac_arch" = "xx86_64"; then |
110 |
|
CFLAGS="-fPIC $CFLAGS" |
111 |
|
CPPFLAGS="-fPIC $CPPFLAGS" |
112 |
|
ac_topdirs="$ac_topdirs /usr/lib64" |
113 |
|
fi |
114 |
|
|
115 |
|
for X in $ac_topdirs; do |
116 |
|
for Y in $ac_qtdirs; do |
117 |
|
if test -d $X/$Y/bin; then |
118 |
|
ac_with_paths="$X/$Y $ac_with_paths" |
119 |
|
fi |
120 |
|
done |
121 |
|
done |
122 |
|
|
123 |
# Prepend alternate dependencies paths. |
# Prepend alternate dependencies paths. |
124 |
ac_path=$PATH |
ac_path=$PATH |
125 |
for X in $ac_with_paths; do |
for X in $ac_with_paths; do |
126 |
if test -d $X/bin; then |
if test -d $X/bin; then |
127 |
ac_path="$X/bin:$ac_path" |
ac_path="$X/bin:$ac_path" |
128 |
fi |
fi |
129 |
if test -x $X/qmake; then |
# if test -x $X/qmake; then |
130 |
ac_path="$X:$ac_path" |
# ac_path="$X:$ac_path" |
131 |
fi |
# fi |
132 |
if test -d $X/include; then |
if test -d $X/include; then |
133 |
for Y in qt qt4; do |
for Y in $ac_qtdirs; do |
134 |
if test -d $X/include/$Y; then |
if test -d $X/include/$Y; then |
135 |
CFLAGS="-I$X/include/$Y $CFLAGS" |
CFLAGS="-I$X/include/$Y $CFLAGS" |
136 |
CPPFLAGS="-I$X/include/$Y $CPPFLAGS" |
CPPFLAGS="-I$X/include/$Y $CPPFLAGS" |
141 |
CPPFLAGS="-I$X/include $CPPFLAGS" |
CPPFLAGS="-I$X/include $CPPFLAGS" |
142 |
ac_incpath="$X/include $ac_incpath" |
ac_incpath="$X/include $ac_incpath" |
143 |
fi |
fi |
144 |
if test -d $X/lib64; then |
if test "x$ac_arch" = "xx86_64" -a -d $X/lib64; then |
145 |
LIBS="-L$X/lib64 $LIBS" |
LIBS="-L$X/lib64 $LIBS" |
146 |
ac_libs="-L$X/lib64 $ac_libs" |
ac_libs="-L$X/lib64 $ac_libs" |
147 |
fi |
fi |
151 |
fi |
fi |
152 |
done |
done |
153 |
|
|
154 |
|
|
155 |
# Check for proper Qt version. |
# Check for proper Qt version. |
156 |
AC_CACHE_CHECK([for Qt library version >= 4.1], |
AC_CACHE_CHECK([for Qt library version >= 4.4], |
157 |
ac_cv_qtversion, [ |
ac_cv_qtversion, [ |
158 |
AC_TRY_LINK([#include "Qt/qglobal.h"], [ |
AC_TRY_LINK([#include "QtCore/qglobal.h"], [ |
159 |
#if QT_VERSION < 0x040100 |
#if QT_VERSION < 0x040400 |
160 |
#error Qt library 4.1 or greater required. |
#error Qt library 4.4 or greater required. |
161 |
#endif |
#endif |
162 |
], ac_cv_qtversion="yes", [ |
], ac_cv_qtversion="yes", [ |
163 |
echo "no; Qt 4.1 or greater is required" |
echo "no; Qt 4.4 or greater is required" |
164 |
exit |
exit |
165 |
]) |
]) |
166 |
]) |
]) |
167 |
|
|
168 |
|
|
169 |
# A common error message: |
# A common error message: |
170 |
ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." |
ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." |
171 |
|
|
221 |
AC_MSG_ERROR([LSCP library not found.]) |
AC_MSG_ERROR([LSCP library not found.]) |
222 |
fi |
fi |
223 |
ac_libs="$ac_libs -llscp" |
ac_libs="$ac_libs -llscp" |
224 |
|
case "{$host}" in |
225 |
|
*mingw*) |
226 |
|
ac_libs="$ac_libs -lws2_32" |
227 |
|
LIBS="$LIBS -lws2_32" |
228 |
|
;; |
229 |
|
esac |
230 |
|
|
231 |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
232 |
ac_cv_instrument_name, [ |
ac_cv_instrument_name, [ |
351 |
AC_LANG_SAVE |
AC_LANG_SAVE |
352 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
353 |
CXXFLAGS="$ac_libs" |
CXXFLAGS="$ac_libs" |
354 |
AC_TRY_RUN([ |
AC_TRY_COMPILE([ |
355 |
#include <stdlib.h> |
#include <stdlib.h> |
356 |
#include <gig.h> |
#include <gig.h> |
357 |
int main() { |
],[ |
358 |
gig::File file; |
gig::File file; |
359 |
file.SetAutoLoad(false); |
file.SetAutoLoad(false); |
|
exit(0); |
|
|
} |
|
360 |
], |
], |
361 |
have_libgig_setautoload="yes", |
have_libgig_setautoload="yes", |
|
have_libgig_setautoload="no", |
|
362 |
have_libgig_setautoload="no" |
have_libgig_setautoload="no" |
363 |
) |
) |
364 |
AC_LANG_RESTORE |
AC_LANG_RESTORE |
375 |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
376 |
fi |
fi |
377 |
|
|
378 |
|
# Check for debugging stack-trace. |
379 |
|
if test "x$ac_stacktrace" = "xyes"; then |
380 |
|
AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) |
381 |
|
fi |
382 |
|
|
383 |
|
# Some recent distros (eg. fedora, debian) require this. |
384 |
|
if test "x$ac_cv_lib_X11_main" = "xyes"; then |
385 |
|
ac_libs="$ac_libs -lX11" |
386 |
|
fi |
387 |
|
|
388 |
AC_SUBST(ac_libs) |
AC_SUBST(ac_libs) |
389 |
AC_SUBST(ac_incpath) |
AC_SUBST(ac_incpath) |
390 |
|
|
391 |
# Checks for header files. |
# Checks for header files. |
392 |
AC_HEADER_STDC |
AC_HEADER_STDC |
393 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
394 |
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) |
395 |
|
|
396 |
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"]) |
397 |
if test "x$ac_lscp_h" = "xno"; then |
if test "x$ac_lscp_h" = "xno"; then |
433 |
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" |
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" |
434 |
echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" |
echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" |
435 |
echo |
echo |
436 |
|
echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" |
437 |
|
echo |
438 |
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
439 |
echo |
echo |
440 |
echo "Now type 'make', followed by 'make install' as root." |
echo "Now type 'make', followed by 'make install' as root." |