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.3.1, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.2.3.11, rncbc@rncbc.org, qsampler) |
3 |
|
|
4 |
AC_CONFIG_SRCDIR(src/qsampler.cpp) |
AC_CONFIG_SRCDIR(src/qsampler.cpp) |
5 |
AC_CONFIG_HEADERS(src/config.h) |
AC_CONFIG_HEADERS(src/config.h) |
62 |
|
|
63 |
|
|
64 |
# Standard installation base dirs. |
# Standard installation base dirs. |
65 |
ac_with_paths="/usr /usr/local" |
if test "$cross_compiling" = yes; then |
66 |
|
ac_with_paths="" |
67 |
|
else |
68 |
|
ac_with_paths="/usr /usr/local" |
69 |
|
fi |
70 |
|
|
71 |
# Set for alternate Qt installation dir. |
# Set for alternate Qt installation dir. |
72 |
AC_ARG_WITH(qt, |
AC_ARG_WITH(qt, |
83 |
AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]), |
AC_HELP_STRING([--with-libgig=PATH], [use alternate libgig install path]), |
84 |
[ac_with_paths="$ac_with_paths $withval"]) |
[ac_with_paths="$ac_with_paths $withval"]) |
85 |
|
|
86 |
|
|
87 |
|
# Honor user specified flags. |
88 |
|
ac_cflags=$CFLAGS |
89 |
|
ac_ldflags=$LDFLAGS |
90 |
|
|
91 |
|
|
92 |
# Checks for programs. |
# Checks for programs. |
93 |
AC_PROG_CC |
AC_PROG_CC |
94 |
AC_PROG_CPP |
AC_PROG_CPP |
100 |
AC_LANG_C |
AC_LANG_C |
101 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
102 |
|
|
103 |
|
PKG_PROG_PKG_CONFIG |
104 |
|
|
105 |
# Check for proper flags. |
# Check for proper flags. |
106 |
ac_arch=`uname -m` |
ac_arch=`uname -m` |
354 |
|
|
355 |
# Check for optional libraries. |
# Check for optional libraries. |
356 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
357 |
AC_CHECK_LIB(gig, main, [ac_libgig="yes"], [ac_libgig="no"]) |
PKG_CHECK_MODULES(LIBGIG, gig >= 3.3.0, [ac_libgig="yes"], [ac_libgig="no"]) |
358 |
|
AC_SUBST(LIBGIG_CFLAGS) |
359 |
|
AC_SUBST(LIBGIG_LIBS) |
360 |
|
ac_cflags="$ac_cflags $LIBGIG_CFLAGS" |
361 |
|
ac_libs="$ac_libs $LIBGIG_LIBS" |
362 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
363 |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
364 |
ac_libs="$ac_libs -lgig" |
AC_DEFINE(CONFIG_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) |
365 |
AC_MSG_CHECKING([for gig::File::SetAutoLoad() method in libgig]) |
ac_libgig_setautoload="yes" |
|
AC_LANG_SAVE |
|
|
AC_LANG_CPLUSPLUS |
|
|
CXXFLAGS="$ac_libs" |
|
|
AC_TRY_COMPILE([ |
|
|
#include <stdlib.h> |
|
|
#include <gig.h> |
|
|
],[ |
|
|
gig::File file; |
|
|
file.SetAutoLoad(false); |
|
|
], |
|
|
have_libgig_setautoload="yes", |
|
|
have_libgig_setautoload="no" |
|
|
) |
|
|
AC_LANG_RESTORE |
|
|
AC_MSG_RESULT([$have_libgig_setautoload]) |
|
|
if test "x$have_libgig_setautoload" = "xyes"; then |
|
|
AC_DEFINE(HAVE_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) |
|
|
fi |
|
366 |
fi |
fi |
367 |
fi |
fi |
368 |
|
|
384 |
|
|
385 |
AC_SUBST(ac_libs) |
AC_SUBST(ac_libs) |
386 |
AC_SUBST(ac_incpath) |
AC_SUBST(ac_incpath) |
387 |
|
AC_SUBST(ac_cflags) |
388 |
|
AC_SUBST(ac_ldflags) |
389 |
|
|
390 |
# Checks for header files. |
# Checks for header files. |
391 |
AC_HEADER_STDC |
AC_HEADER_STDC |
397 |
AC_MSG_ERROR([LSCP headers not found.]) |
AC_MSG_ERROR([LSCP headers not found.]) |
398 |
fi |
fi |
399 |
|
|
400 |
|
if test "x$ac_libgig" = "xyes"; then |
401 |
|
AC_CHECK_HEADER(SF.h, [ac_libgig_sf2="yes"], [ac_libgig_sf2="no"]) |
402 |
|
if test "x$ac_libgig_sf2" = "xyes"; then |
403 |
|
AC_DEFINE(CONFIG_LIBGIG_SF2, 1, [Define if libgig SF.h is available.]) |
404 |
|
fi |
405 |
|
fi |
406 |
|
|
407 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics. |
408 |
# AC_C_CONST |
# AC_C_CONST |
409 |
|
|
433 |
echo " LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument" |
echo " LSCP edit instrument support . . . . . . . . . . .: $ac_edit_instrument" |
434 |
echo " GigaSampler instrument file support (libgig) . . .: $ac_libgig" |
echo " GigaSampler instrument file support (libgig) . . .: $ac_libgig" |
435 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
436 |
echo " libgig supports fast information retrieval . . . .: $have_libgig_setautoload" |
echo " libgig supports fast information retrieval . . . .: $ac_libgig_setautoload" |
437 |
|
echo " libgig supports SoundFont2 instruments files . . .: $ac_libgig_sf2" |
438 |
fi |
fi |
439 |
echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event" |
echo " LSCP channel MIDI event support . . . . . . . . .: $ac_channel_midi_event" |
440 |
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" |
echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" |