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.1.3.23, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.2.1.4, rncbc@rncbc.org, qsampler) |
3 |
AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h) |
|
4 |
|
AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui) |
5 |
AC_CONFIG_HEADERS(config.h) |
AC_CONFIG_HEADERS(config.h) |
6 |
AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec) |
AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec qsampler.desktop) |
7 |
|
|
8 |
# Set default installation prefix. |
# Set default installation prefix. |
9 |
AC_PREFIX_DEFAULT(/usr/local) |
AC_PREFIX_DEFAULT(/usr/local) |
17 |
# Enable debugging argument option. |
# Enable debugging argument option. |
18 |
AC_ARG_ENABLE(debug, |
AC_ARG_ENABLE(debug, |
19 |
AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]), |
AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]), |
20 |
[ac_debug="debug"], |
[ac_debug="$enableval"]) |
|
[ac_debug="release"]) |
|
|
AC_SUBST(ac_debug) |
|
21 |
|
|
22 |
if test "x$ac_debug" = "xdebug"; 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_debug="debug" |
25 |
|
else |
26 |
|
ac_debug="release" |
27 |
fi |
fi |
28 |
|
AC_SUBST(ac_debug) |
29 |
|
|
30 |
# Enable libgig availability. |
# Enable libgig availability. |
31 |
AC_ARG_ENABLE(libgig, |
AC_ARG_ENABLE(libgig, |
32 |
AC_HELP_STRING([--disable-libgig], [disable libgig interface (default=no)]), |
AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), |
33 |
[ac_libgig="no"], |
[ac_libgig="$enableval"], |
34 |
[ac_libgig="yes"]) |
[ac_libgig="yes"]) |
35 |
|
|
36 |
|
# Standard installation base dirs. |
37 |
|
ac_with_paths="/usr /usr/local" |
38 |
|
|
39 |
|
# Some a-la-debian alternatives... |
40 |
|
for X in /usr/lib /usr/share; do |
41 |
|
for Y in qt qt4; do |
42 |
|
if test -d $X/$Y/bin; then |
43 |
|
ac_with_paths="$ac_with_paths $X/$Y" |
44 |
|
fi |
45 |
|
done |
46 |
|
done |
47 |
|
|
48 |
|
# Set for alternate Qt installation dir. |
49 |
|
AC_ARG_WITH(qt, |
50 |
|
AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]), |
51 |
|
[ac_with_paths="$ac_with_paths $withval"]) |
52 |
|
|
53 |
# Set for alternate liblscp installation dir. |
# Set for alternate liblscp installation dir. |
54 |
AC_ARG_WITH(liblscp, |
AC_ARG_WITH(liblscp, |
55 |
AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]), |
AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]), |
72 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
73 |
|
|
74 |
# Prepend alternate dependencies paths. |
# Prepend alternate dependencies paths. |
75 |
|
ac_path=$PATH |
76 |
for X in $ac_with_paths; do |
for X in $ac_with_paths; do |
77 |
|
if test -d $X/bin; then |
78 |
|
ac_path="$X/bin:$ac_path" |
79 |
|
fi |
80 |
|
if test -x $X/qmake; then |
81 |
|
ac_path="$X:$ac_path" |
82 |
|
fi |
83 |
if test -d $X/include; then |
if test -d $X/include; then |
84 |
CFLAGS="$CFLAGS -I$X/include" |
for Y in qt qt4; do |
85 |
CPPFLAGS="$CPPFLAGS -I$X/include" |
if test -d $X/include/$Y; then |
86 |
|
CFLAGS="-I$X/include/$Y $CFLAGS" |
87 |
|
CPPFLAGS="-I$X/include/$Y $CPPFLAGS" |
88 |
|
ac_incpath="$X/include/$Y $ac_incpath" |
89 |
|
fi |
90 |
|
done |
91 |
|
CFLAGS="-I$X/include $CFLAGS" |
92 |
|
CPPFLAGS="-I$X/include $CPPFLAGS" |
93 |
ac_incpath="$X/include $ac_incpath" |
ac_incpath="$X/include $ac_incpath" |
94 |
fi |
fi |
95 |
if test -d $X/lib64; then |
if test -d $X/lib64; then |
96 |
LIBS="$LIBS -L$X/lib64" |
LIBS="-L$X/lib64 $LIBS" |
97 |
ac_libs="$ac_libs -L$X/lib64" |
ac_libs="-L$X/lib64 $ac_libs" |
98 |
fi |
fi |
99 |
if test -d $X/lib; then |
if test -d $X/lib; then |
100 |
LIBS="$LIBS -L$X/lib" |
LIBS="-L$X/lib $LIBS" |
101 |
ac_libs="-L$X/lib $ac_libs" |
ac_libs="-L$X/lib $ac_libs" |
102 |
fi |
fi |
103 |
done |
done |
104 |
|
|
105 |
# Check for QTDIR environment variable. |
# Check for proper Qt version. |
106 |
AC_MSG_CHECKING([whether QTDIR environment variable is set]) |
AC_CACHE_CHECK([for Qt library version >= 4.1], |
|
if test "x$QTDIR" = "x"; then |
|
|
AC_MSG_RESULT([no]) |
|
|
AC_MSG_ERROR([QTDIR must be properly set.]) |
|
|
else |
|
|
AC_MSG_RESULT([$QTDIR]) |
|
|
fi |
|
|
|
|
|
CFLAGS="$CFLAGS -I$QTDIR/include" |
|
|
CPPFLAGS="$CPPFLAGS -I$QTDIR/include" |
|
|
if test -d $QTDIR/lib64; then |
|
|
LIBS="$LIBS -L$QTDIR/lib64" |
|
|
else |
|
|
LIBS="$LIBS -L$QTDIR/lib" |
|
|
fi |
|
|
for X in qt qt3; do |
|
|
if test -d $QTDIR/include/$X; then |
|
|
CFLAGS="$CFLAGS -I$QTDIR/include/$X" |
|
|
CPPFLAGS="$CPPFLAGS -I$QTDIR/include/$X" |
|
|
fi |
|
|
done |
|
|
|
|
|
# Checks for Qt library. |
|
|
for X in qt-mt qt; do |
|
|
if test "x$ac_qtlib" = "x"; then |
|
|
AC_CHECK_LIB($X, main, [ac_qtlib=$X]) |
|
|
fi |
|
|
done |
|
|
if test "x$ac_qtlib" = "x"; then |
|
|
AC_MSG_ERROR([Qt library not found. Maybe QTDIR isn't properly set.]) |
|
|
fi |
|
|
AC_SUBST(ac_qtlib) |
|
|
|
|
|
# Check for Qt multi-thread support. |
|
|
if test "x$ac_qtlib" = "xqt-mt"; then |
|
|
ac_thread="thread" |
|
|
fi |
|
|
AC_SUBST(ac_thread) |
|
|
|
|
|
AC_CACHE_CHECK([for Qt library version >= 3.1.1], |
|
107 |
ac_qtlib_version, [ |
ac_qtlib_version, [ |
108 |
AC_TRY_LINK([#include "qglobal.h"], [ |
AC_TRY_LINK([#include "Qt/qglobal.h"], [ |
109 |
#if QT_VERSION < 0x030101 |
#if QT_VERSION < 0x040100 |
110 |
#error Qt library 3.1.1 or greater required. |
#error Qt library 4.1 or greater required. |
111 |
#endif |
#endif |
112 |
], |
], |
113 |
ac_qtlib_version="yes", [ |
ac_qtlib_version="yes", [ |
114 |
echo "no; Qt 3.1.1 or greater is required" |
echo "no; Qt 4.1 or greater is required" |
115 |
exit |
exit |
116 |
]) |
]) |
117 |
]) |
]) |
118 |
|
|
119 |
# A common error message: |
# A common error message: |
120 |
ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)." |
ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)." |
121 |
|
|
122 |
# Check for Qt qmake utility. |
# Check for Qt qmake utility. |
123 |
AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin:${PATH}) |
AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path) |
124 |
if test "x$ac_qmake" = "xno"; then |
if test "x$ac_qmake" = "xno"; then |
125 |
AC_MSG_ERROR([qmake $ac_qtdir_errmsg]) |
AC_MSG_ERROR([qmake $ac_errmsg]) |
126 |
fi |
fi |
127 |
AC_SUBST(ac_qmake) |
AC_SUBST(ac_qmake) |
128 |
|
|
129 |
# Check for Qt moc utility. |
# Check for Qt moc utility. |
130 |
AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin:${PATH}) |
AC_PATH_PROG(ac_moc, moc, [no], $ac_path) |
131 |
if test "x$ac_moc" = "xno"; then |
if test "x$ac_moc" = "xno"; then |
132 |
AC_MSG_ERROR([moc $ac_qtdir_errmsg]) |
AC_MSG_ERROR([moc $ac_errmsg]) |
133 |
fi |
fi |
134 |
AC_SUBST(ac_moc) |
AC_SUBST(ac_moc) |
135 |
|
|
136 |
# Check for Qt uic utility. |
# Check for Qt uic utility. |
137 |
AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin:${PATH}) |
AC_PATH_PROG(ac_uic, uic, [no], $ac_path) |
138 |
if test "x$ac_uic" = "xno"; then |
if test "x$ac_uic" = "xno"; then |
139 |
AC_MSG_ERROR([uic $ac_qtdir_errmsg]) |
AC_MSG_ERROR([uic $ac_errmsg]) |
140 |
fi |
fi |
141 |
AC_SUBST(ac_uic) |
AC_SUBST(ac_uic) |
142 |
|
|
144 |
AC_CHECK_LIB(m, main) |
AC_CHECK_LIB(m, main) |
145 |
AC_CHECK_LIB(X11, main) |
AC_CHECK_LIB(X11, main) |
146 |
AC_CHECK_LIB(Xext, main) |
AC_CHECK_LIB(Xext, main) |
|
AC_CHECK_LIB($ac_qtlib, main) |
|
147 |
|
|
148 |
# Check for round math function. |
# Check for round math function. |
149 |
AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"]) |
AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"]) |
205 |
if test "x$ac_fxsend_level" = "xyes"; then |
if test "x$ac_fxsend_level" = "xyes"; then |
206 |
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.]) |
207 |
fi |
fi |
208 |
|
AC_CHECK_LIB(lscp, lscp_set_fxsend_name, [ac_fxsend_rename="yes"], [ac_fxsend_rename="no"]) |
209 |
|
if test "x$ac_fxsend_rename" = "xyes"; then |
210 |
|
AC_DEFINE(CONFIG_FXSEND_RENAME, 1, [Define if FX send rename is available.]) |
211 |
|
fi |
212 |
fi |
fi |
213 |
|
|
214 |
AC_CACHE_CHECK([for audio_routing array type], |
AC_CACHE_CHECK([for audio_routing array type], |
215 |
ac_audio_routing, [ |
ac_audio_routing, [ |
216 |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
217 |
lscp_channel_info_t info; |
lscp_channel_info_t info; |
218 |
char ch = info.audio_routing[0][0]; |
char ch = info.audio_routing[0][0]; |
219 |
], ac_audio_routing="no", ac_audio_routing="yes") |
], ac_audio_routing="no", ac_audio_routing="yes") |
220 |
]) |
]) |
221 |
if test "x$ac_audio_routing" = "xyes"; then |
if test "x$ac_audio_routing" = "xyes"; then |
222 |
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.]) |
223 |
fi |
fi |
224 |
|
|
225 |
|
AC_CHECK_LIB(lscp, lscp_set_volume, [ac_volume="yes"], [ac_volume="no"]) |
226 |
|
if test "x$ac_volume" = "xyes"; then |
227 |
|
AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.]) |
228 |
|
fi |
229 |
|
|
230 |
|
AC_CHECK_LIB(lscp, lscp_edit_channel_instrument, [ac_edit_instrument="yes"], [ac_edit_instrument="no"]) |
231 |
|
if test "x$ac_edit_instrument" = "xyes"; then |
232 |
|
AC_DEFINE(CONFIG_EDIT_INSTRUMENT, 1, [Define if instrument editing is available.]) |
233 |
|
fi |
234 |
|
|
235 |
# Check for optional libraries. |
# Check for optional libraries. |
236 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
237 |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
238 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
239 |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
240 |
ac_libs="$ac_libs -lgig" |
ac_libs="$ac_libs -lgig" |
241 |
|
AC_MSG_CHECKING([for gig::File::SetAutoLoad() method in libgig]) |
242 |
|
AC_LANG_SAVE |
243 |
|
AC_LANG_CPLUSPLUS |
244 |
|
CXXFLAGS="$ac_libs" |
245 |
|
AC_TRY_RUN([ |
246 |
|
#include <stdlib.h> |
247 |
|
#include <gig.h> |
248 |
|
int main() { |
249 |
|
gig::File file; |
250 |
|
file.SetAutoLoad(false); |
251 |
|
exit(0); |
252 |
|
} |
253 |
|
], |
254 |
|
have_libgig_setautoload="yes", |
255 |
|
have_libgig_setautoload="no", |
256 |
|
have_libgig_setautoload="no" |
257 |
|
) |
258 |
|
AC_LANG_RESTORE |
259 |
|
AC_MSG_RESULT([$have_libgig_setautoload]) |
260 |
|
if test "x$have_libgig_setautoload" = "xyes"; then |
261 |
|
AC_DEFINE(HAVE_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) |
262 |
|
fi |
263 |
fi |
fi |
264 |
fi |
fi |
265 |
|
|
293 |
|
|
294 |
# make clean > /dev/null 2>&1 |
# make clean > /dev/null 2>&1 |
295 |
|
|
296 |
echo "" |
# Output summary message |
297 |
|
|
298 |
|
echo |
299 |
|
echo " $PACKAGE_NAME $PACKAGE_VERSION" |
300 |
|
echo |
301 |
|
echo " Build target . . . . . . . . . . . . . . . . . . .: $ac_debug" |
302 |
|
echo |
303 |
|
echo " LSCP instrument name support . . . . . . . . . . .: $ac_instrument_name" |
304 |
|
echo " LSCP mute/solo support . . . . . . . . . . . . . .: $ac_mute_solo" |
305 |
|
echo " LSCP MIDI instrument support . . . . . . . . . . .: $ac_midi_instrument" |
306 |
|
echo " LSCP FX send support . . . . . . . . . . . . . . .: $ac_fxsend" |
307 |
|
echo " LSCP FX send level support . . . . . . . . . . . .: $ac_fxsend_level" |
308 |
|
echo " LSCP FX send rename support . . . . . . . . . . .: $ac_fxsend_rename" |
309 |
|
echo " LSCP audio routing support . . . . . . . . . . . .: $ac_audio_routing" |
310 |
|
echo " LSCP volume support . . . . . . . . . . . . . . .: $ac_volume" |
311 |
|
echo " LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument" |
312 |
|
echo " GigaSampler instrument file support (libgig) . . .: $ac_libgig" |
313 |
|
if test "x$ac_libgig" = "xyes"; then |
314 |
|
echo " libgig supports fast information retrieval . . . .: $have_libgig_setautoload" |
315 |
|
fi |
316 |
|
echo |
317 |
|
echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" |
318 |
|
echo |
319 |
echo "Now type 'make', followed by 'make install' as root." |
echo "Now type 'make', followed by 'make install' as root." |
320 |
echo "" |
echo |