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.2.9, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.1.3.25, rncbc@rncbc.org, qsampler) |
3 |
AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h) |
AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui.h) |
4 |
AC_CONFIG_HEADERS(config.h) |
AC_CONFIG_HEADERS(config.h) |
5 |
AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec) |
AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec) |
30 |
[ac_libgig="no"], |
[ac_libgig="no"], |
31 |
[ac_libgig="yes"]) |
[ac_libgig="yes"]) |
32 |
|
|
33 |
|
# Set for alternate liblscp installation dir. |
34 |
|
AC_ARG_WITH(liblscp, |
35 |
|
AC_HELP_STRING([--with-liblscp=PATH], [use alternate liblscp install path]), |
36 |
|
[ac_with_paths="$ac_with_paths $withval"]) |
37 |
|
|
38 |
|
# Set for alternate libgig installation dir. |
39 |
|
AC_ARG_WITH(libgig, |
40 |
|
AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]), |
41 |
|
[ac_with_paths="$ac_with_paths $withval"]) |
42 |
|
|
43 |
# Checks for programs. |
# Checks for programs. |
44 |
AC_PROG_CC |
AC_PROG_CC |
45 |
AC_PROG_CPP |
AC_PROG_CPP |
51 |
AC_LANG_C |
AC_LANG_C |
52 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
53 |
|
|
54 |
|
# Prepend alternate dependencies paths. |
55 |
|
for X in $ac_with_paths; do |
56 |
|
if test -d $X/include; then |
57 |
|
CFLAGS="$CFLAGS -I$X/include" |
58 |
|
CPPFLAGS="$CPPFLAGS -I$X/include" |
59 |
|
ac_incpath="$X/include $ac_incpath" |
60 |
|
fi |
61 |
|
if test -d $X/lib64; then |
62 |
|
LIBS="$LIBS -L$X/lib64" |
63 |
|
ac_libs="$ac_libs -L$X/lib64" |
64 |
|
fi |
65 |
|
if test -d $X/lib; then |
66 |
|
LIBS="$LIBS -L$X/lib" |
67 |
|
ac_libs="-L$X/lib $ac_libs" |
68 |
|
fi |
69 |
|
done |
70 |
|
|
71 |
# Check for QTDIR environment variable. |
# Check for QTDIR environment variable. |
72 |
AC_MSG_CHECKING([whether QTDIR environment variable is set]) |
AC_MSG_CHECKING([whether QTDIR environment variable is set]) |
73 |
if test "x$QTDIR" = "x"; then |
if test "x$QTDIR" = "x"; then |
79 |
|
|
80 |
CFLAGS="$CFLAGS -I$QTDIR/include" |
CFLAGS="$CFLAGS -I$QTDIR/include" |
81 |
CPPFLAGS="$CPPFLAGS -I$QTDIR/include" |
CPPFLAGS="$CPPFLAGS -I$QTDIR/include" |
82 |
LIBS="-L$QTDIR/lib" |
if test -d $QTDIR/lib64; then |
83 |
|
LIBS="$LIBS -L$QTDIR/lib64" |
84 |
|
else |
85 |
|
LIBS="$LIBS -L$QTDIR/lib" |
86 |
|
fi |
87 |
for X in qt qt3; do |
for X in qt qt3; do |
88 |
if test -d $QTDIR/include/$X; then |
if test -d $QTDIR/include/$X; then |
89 |
CFLAGS="$CFLAGS -I$QTDIR/include/$X" |
CFLAGS="$CFLAGS -I$QTDIR/include/$X" |
162 |
if test "x$ac_liblscp" = "xno"; then |
if test "x$ac_liblscp" = "xno"; then |
163 |
AC_MSG_ERROR([LSCP library not found.]) |
AC_MSG_ERROR([LSCP library not found.]) |
164 |
fi |
fi |
165 |
ac_libs="-llscp" |
ac_libs="$ac_libs -llscp" |
166 |
|
|
167 |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
168 |
ac_instrument_name, [ |
ac_instrument_name, [ |
193 |
AC_DEFINE(CONFIG_MUTE_SOLO, 1, [Define if mute/solo is available.]) |
AC_DEFINE(CONFIG_MUTE_SOLO, 1, [Define if mute/solo is available.]) |
194 |
fi |
fi |
195 |
|
|
196 |
|
AC_CHECK_LIB(lscp, lscp_map_midi_instrument, [ac_midi_instrument="yes"], [ac_midi_instrument="no"]) |
197 |
|
if test "x$ac_midi_instrument" = "xyes"; then |
198 |
|
AC_DEFINE(CONFIG_MIDI_INSTRUMENT, 1, [Define if MIDI instrument mapping is available.]) |
199 |
|
fi |
200 |
|
|
201 |
|
AC_CHECK_LIB(lscp, lscp_create_fxsend, [ac_fxsend="yes"], [ac_fxsend="no"]) |
202 |
|
if test "x$ac_fxsend" = "xyes"; then |
203 |
|
AC_DEFINE(CONFIG_FXSEND, 1, [Define if FX sends is available.]) |
204 |
|
AC_CACHE_CHECK([for FX send level in lscp_fxsend_info_t], |
205 |
|
ac_fxsend_level, [ |
206 |
|
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
207 |
|
lscp_fxsend_info_t info; |
208 |
|
info.level = 0.0f; |
209 |
|
], ac_fxsend_level="yes", ac_fxsend_level="no") |
210 |
|
]) |
211 |
|
if test "x$ac_fxsend_level" = "xyes"; then |
212 |
|
AC_DEFINE(CONFIG_FXSEND_LEVEL, 1, [Define if FX send level is available.]) |
213 |
|
fi |
214 |
|
fi |
215 |
|
|
216 |
|
AC_CACHE_CHECK([for audio_routing array type], |
217 |
|
ac_audio_routing, [ |
218 |
|
AC_TRY_COMPILE([#include "lscp/client.h"], [ |
219 |
|
lscp_channel_info_t info; |
220 |
|
char ch = info.audio_routing[0][0]; |
221 |
|
], ac_audio_routing="no", ac_audio_routing="yes") |
222 |
|
]) |
223 |
|
if test "x$ac_audio_routing" = "xyes"; then |
224 |
|
AC_DEFINE(CONFIG_AUDIO_ROUTING, 1, [Define if audio_routing is an integer array.]) |
225 |
|
fi |
226 |
|
|
227 |
|
AC_CHECK_LIB(lscp, lscp_set_volume, [ac_volume="yes"], [ac_volume="no"]) |
228 |
|
if test "x$ac_volume" = "xyes"; then |
229 |
|
AC_DEFINE(CONFIG_VOLUME, 1, [Define if global volume is available.]) |
230 |
|
fi |
231 |
|
|
232 |
# Check for optional libraries. |
# Check for optional libraries. |
233 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
234 |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
235 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
236 |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
237 |
ac_libs="-lgig $ac_libs" |
ac_libs="$ac_libs -lgig" |
238 |
fi |
fi |
239 |
fi |
fi |
240 |
|
|
241 |
|
# Check for round math function. |
242 |
|
AC_CHECK_LIB(m, lroundf, [ac_round="yes"], [ac_round="no"]) |
243 |
|
if test "x$ac_round" = "xyes"; then |
244 |
|
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
245 |
|
fi |
246 |
|
|
247 |
AC_SUBST(ac_libs) |
AC_SUBST(ac_libs) |
248 |
|
AC_SUBST(ac_incpath) |
249 |
|
|
250 |
# Checks for header files. |
# Checks for header files. |
251 |
AC_HEADER_STDC |
AC_HEADER_STDC |
252 |
AC_HEADER_SYS_WAIT |
AC_HEADER_SYS_WAIT |
253 |
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h) |
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h) |
254 |
|
|
255 |
# 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"]) |
256 |
# if test "x$ac_lscp_h" = "xno"; then |
if test "x$ac_lscp_h" = "xno"; then |
257 |
# AC_MSG_ERROR([LSCP headers not found.]) |
AC_MSG_ERROR([LSCP headers not found.]) |
258 |
# fi |
fi |
259 |
|
|
260 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics. |
261 |
# AC_C_CONST |
# AC_C_CONST |