--- qsampler/trunk/configure.ac 2008/12/25 17:07:22 1820 +++ qsampler/trunk/configure.ac 2010/07/15 08:03:32 2108 @@ -1,9 +1,9 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(Qsampler, 0.2.1.23, rncbc@rncbc.org, qsampler) +AC_INIT(Qsampler, 0.2.2.25, rncbc@rncbc.org, qsampler) -AC_CONFIG_SRCDIR(src/qsamplerMainForm.ui) -AC_CONFIG_HEADERS(config.h) -AC_CONFIG_FILES(Makefile qsampler.pro qsampler.spec qsampler.desktop) +AC_CONFIG_SRCDIR(src/qsampler.cpp) +AC_CONFIG_HEADERS(src/config.h) +AC_CONFIG_FILES(Makefile qsampler.spec src/src.pri src/qsampler.desktop) # Set default installation prefix. AC_PREFIX_DEFAULT(/usr/local) @@ -21,8 +21,10 @@ if test "x$ac_debug" = "xyes"; then AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.]) + ac_stacktrace="yes" ac_debug="debug" else + ac_stacktrace="no" ac_debug="release" fi AC_SUBST(ac_debug) @@ -33,11 +35,17 @@ [ac_libgig="$enableval"], [ac_libgig="yes"]) +# Enable debugger stack-trace option (assumes --enable-debug). +AC_ARG_ENABLE(stacktrace, + AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]), + [ac_stacktrace="$enableval"]) + + # Standard installation base dirs. ac_with_paths="/usr /usr/local" # Some a-la-debian alternatives... -for X in /usr/lib /usr/share; do +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" @@ -103,14 +111,14 @@ done # Check for proper Qt version. -AC_CACHE_CHECK([for Qt library version >= 4.1], +AC_CACHE_CHECK([for Qt library version >= 4.2], ac_cv_qtversion, [ AC_TRY_LINK([#include "Qt/qglobal.h"], [ -#if QT_VERSION < 0x040100 -#error Qt library 4.1 or greater required. +#if QT_VERSION < 0x040200 +#error Qt library 4.2 or greater required. #endif ], ac_cv_qtversion="yes", [ - echo "no; Qt 4.1 or greater is required" + echo "no; Qt 4.2 or greater is required" exit ]) ]) @@ -139,6 +147,20 @@ fi AC_SUBST(ac_uic) +# Check for Qt lupdate utility. +AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path) +if test "x$ac_lupdate" = "xno"; then + AC_MSG_ERROR([lupdate $ac_errmsg]) +fi +AC_SUBST(ac_lupdate) + +# Check for Qt lrelease utility. +AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path) +if test "x$ac_release" = "xno"; then + AC_MSG_ERROR([lrelease $ac_errmsg]) +fi +AC_SUBST(ac_lrelease) + # Checks for libraries. AC_CHECK_LIB(m, main) AC_CHECK_LIB(X11, main) @@ -307,6 +329,11 @@ AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) fi +# Check for debugging stack-trace. +if test "x$ac_stacktrace" = "xyes"; then + AC_DEFINE(CONFIG_STACKTRACE, 1, [Define if debugger stack-trace is enabled.]) +fi + AC_SUBST(ac_libs) AC_SUBST(ac_incpath) @@ -355,6 +382,8 @@ echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" echo +echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" +echo echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix" echo echo "Now type 'make', followed by 'make install' as root."