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.4.1.1, rncbc@rncbc.org, qsampler) |
AC_INIT(Qsampler, 0.4.1.6, 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) |
127 |
# Checks for languages. |
# Checks for languages. |
128 |
AC_LANG_CPLUSPLUS |
AC_LANG_CPLUSPLUS |
129 |
|
|
130 |
|
# Check for pkg-config. |
131 |
PKG_PROG_PKG_CONFIG |
PKG_PROG_PKG_CONFIG |
132 |
|
|
133 |
# Check for proper flags. |
# Check for proper flags. |
286 |
fi |
fi |
287 |
|
|
288 |
# Check for mandatory libraries. |
# Check for mandatory libraries. |
289 |
AC_CHECK_LIB(lscp, main, [ac_liblscp="yes"], [ac_liblscp="no"]) |
PKG_CHECK_MODULES([LSCP], [lscp], [ac_liblscp="yes"], [ac_liblscp="no"]) |
290 |
if test "x$ac_liblscp" = "xno"; then |
if test "x$ac_liblscp" = "xyes"; then |
291 |
AC_MSG_ERROR([LSCP library not found.]) |
AC_DEFINE(CONFIG_LIBLSCP, 1, [Define if liblscp is available.]) |
292 |
|
ac_cflags="$ac_cflags $LSCP_CFLAGS" |
293 |
|
ac_libs="$ac_libs $LSCP_LIBS" |
294 |
|
else |
295 |
|
AC_MSG_ERROR([*** LSCP library not found (liblscp).]) |
296 |
fi |
fi |
297 |
ac_libs="$ac_libs -llscp" |
|
298 |
case "{$host}" in |
case "{$host}" in |
299 |
*mingw*) |
*mingw*) |
300 |
ac_libs="$ac_libs -lws2_32" |
ac_libs="$ac_libs -lws2_32" |
301 |
LIBS="$LIBS -lws2_32" |
LIBS="$LIBS -lws2_32" |
302 |
;; |
;; |
303 |
esac |
esac |
304 |
|
|
305 |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
AC_CACHE_CHECK([for instrument_name in lscp_channel_info_t], |
417 |
|
|
418 |
# Check for optional libraries. |
# Check for optional libraries. |
419 |
if test "x$ac_libgig" = "xyes"; then |
if test "x$ac_libgig" = "xyes"; then |
420 |
PKG_CHECK_MODULES(LIBGIG, gig >= 3.3.0, [ac_libgig="yes"], [ac_libgig="no"]) |
PKG_CHECK_MODULES([GIG], [gig >= 3.3.0], [ac_libgig="yes"], [ac_libgig="no"]) |
421 |
if test "x$ac_libgig" = "xyes"; then |
fi |
422 |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
if test "x$ac_libgig" = "xyes"; then |
423 |
AC_SUBST(LIBGIG_CFLAGS) |
AC_DEFINE(CONFIG_LIBGIG, 1, [Define if libgig is available.]) |
424 |
AC_SUBST(LIBGIG_LIBS) |
ac_cflags="$ac_cflags $GIG_CFLAGS" |
425 |
ac_cflags="$ac_cflags $LIBGIG_CFLAGS" |
ac_libs="$ac_libs $GIG_LIBS" |
426 |
ac_libs="$ac_libs $LIBGIG_LIBS" |
AC_DEFINE(CONFIG_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) |
427 |
AC_DEFINE(CONFIG_LIBGIG_SETAUTOLOAD, 1, [Define if libgig provides gig::File::SetAutoLoad() method.]) |
ac_libgig_setautoload="yes" |
428 |
ac_libgig_setautoload="yes" |
else |
429 |
fi |
AC_MSG_WARN([*** GIG library not found (libgig).]) |
430 |
fi |
fi |
431 |
|
|
432 |
# Check for round math function. |
# Check for round math function. |
435 |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) |
436 |
fi |
fi |
437 |
|
|
438 |
|
|
439 |
|
# Checks for header files. |
440 |
|
AC_HEADER_STDC |
441 |
|
AC_HEADER_SYS_WAIT |
442 |
|
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h sys/socket.h) |
443 |
|
|
444 |
|
if test "x$ac_libgig" = "xyes"; then |
445 |
|
AC_CHECK_HEADER(libgig/SF.h, [ac_libgig_sf2="yes"], [ac_libgig_sf2="no"]) |
446 |
|
if test "x$ac_libgig_sf2" = "xyes"; then |
447 |
|
AC_DEFINE(CONFIG_LIBGIG_SF2, 1, [Define if libgig/SF.h is available.]) |
448 |
|
fi |
449 |
|
fi |
450 |
|
|
451 |
# Check for X11 unique/single instance. |
# Check for X11 unique/single instance. |
452 |
if test "x$ac_xunique" = "xyes"; then |
if test "x$ac_xunique" = "xyes"; then |
453 |
AC_DEFINE(CONFIG_XUNIQUE, 1, [Define if X11 unique/single instance is enabled.]) |
AC_DEFINE(CONFIG_XUNIQUE, 1, [Define if X11 unique/single instance is enabled.]) |
454 |
|
if test "x$ac_qt4" = "xno"; then |
455 |
|
ac_qx11extras="x11extras" |
456 |
|
fi |
457 |
|
# Some recent distros (eg. fedora, debian) require this. |
458 |
|
if test "x$ac_cv_lib_X11_main" = "xyes"; then |
459 |
|
ac_libs="$ac_libs -lX11" |
460 |
|
fi |
461 |
fi |
fi |
462 |
|
AC_SUBST(ac_qx11extras) |
463 |
|
|
464 |
# Check for debugging stack-trace. |
# Check for debugging stack-trace. |
465 |
if test "x$ac_stacktrace" = "xyes"; then |
if test "x$ac_stacktrace" = "xyes"; then |
466 |
AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) |
AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) |
467 |
fi |
fi |
468 |
|
|
|
# Some recent distros (eg. fedora, debian) require this. |
|
|
if test "x$ac_cv_lib_X11_main" = "xyes"; then |
|
|
ac_libs="$ac_libs -lX11" |
|
|
fi |
|
|
|
|
|
AC_SUBST(ac_libs) |
|
|
AC_SUBST(ac_incpath) |
|
469 |
AC_SUBST(ac_cflags) |
AC_SUBST(ac_cflags) |
470 |
AC_SUBST(ac_ldflags) |
AC_SUBST(ac_ldflags) |
471 |
|
AC_SUBST(ac_incpath) |
472 |
|
AC_SUBST(ac_libs) |
473 |
|
|
|
# Checks for header files. |
|
|
AC_HEADER_STDC |
|
|
AC_HEADER_SYS_WAIT |
|
|
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h signal.h sys/socket.h) |
|
|
|
|
|
AC_CHECK_HEADER(lscp/client.h, [ac_lscp_h="yes"], [ac_lscp_h="no"]) |
|
|
if test "x$ac_lscp_h" = "xno"; then |
|
|
AC_MSG_ERROR([LSCP headers not found.]) |
|
|
fi |
|
|
|
|
|
if test "x$ac_libgig" = "xyes"; then |
|
|
AC_CHECK_HEADER(libgig/SF.h, [ac_libgig_sf2="yes"], [ac_libgig_sf2="no"]) |
|
|
if test "x$ac_libgig_sf2" = "xyes"; then |
|
|
AC_DEFINE(CONFIG_LIBGIG_SF2, 1, [Define if libgig/SF.h is available.]) |
|
|
fi |
|
|
fi |
|
474 |
|
|
475 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics. |
476 |
# AC_C_CONST |
# AC_C_CONST |