--- qsampler/trunk/configure.ac 2015/08/11 23:06:15 2833 +++ qsampler/trunk/configure.ac 2016/05/31 16:40:35 2924 @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(Qsampler, 0.3.1.1, rncbc@rncbc.org, qsampler) +AC_INIT(Qsampler, 0.4.0.5, rncbc@rncbc.org, qsampler) AC_CONFIG_SRCDIR(src/qsampler.cpp) AC_CONFIG_HEADERS(src/config.h) @@ -9,7 +9,7 @@ AC_PREFIX_DEFAULT(/usr/local) ac_prefix=$prefix if test "x$ac_prefix" = "xNONE"; then - ac_prefix=$ac_default_prefix + ac_prefix=$ac_default_prefix fi AC_SUBST(ac_prefix) AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.]) @@ -36,12 +36,6 @@ [ac_qt4="$enableval"], [ac_qt4="no"]) -AC_ARG_ENABLE(qt5, - AC_HELP_STRING([--enable-qt5], [enable Qt5 build (default=yes)]), - [ac_qt5="$enableval"], - [ac_qt5="yes"]) - - # Enable libgig availability. AC_ARG_ENABLE(libgig, @@ -49,6 +43,12 @@ [ac_libgig="$enableval"], [ac_libgig="yes"]) +# Enable X11 unique/single instance. +AC_ARG_ENABLE(xunique, + AC_HELP_STRING([--enable-xunique], [enable X11 unique/single instance (default=yes)]), + [ac_xunique="$enableval"], + [ac_xunique="yes"]) + # Enable debugger stack-trace option (assumes --enable-debug). AC_ARG_ENABLE(stacktrace, AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]), @@ -56,11 +56,7 @@ # Standard installation base dirs. -if test "$cross_compiling" = yes; then - ac_with_paths="" -else - ac_with_paths="/usr /usr/local" -fi +ac_with_paths="" # Set for alternate Qt4/5 installation dir. AC_ARG_WITH(qt4, @@ -78,14 +74,7 @@ if test "x$ac_qt5_path" != "xno"; then ac_with_paths="$ac_with_paths $ac_qt5_path" - ac_qt5="yes" -fi - -if test "x$ac_qt5" = "xno"; then - ac_qt4="yes" -fi -if test "x$ac_qt4" = "xyes"; then - ac_qt5="no" + ac_qt4="no" fi # Set for alternate liblscp installation dir. @@ -105,14 +94,11 @@ # Checks for programs. -AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP -AC_PROG_GCC_TRADITIONAL # Checks for languages. -AC_LANG_C AC_LANG_CPLUSPLUS PKG_PROG_PKG_CONFIG @@ -155,8 +141,7 @@ if test "x$ac_qt4" = "xyes"; then AC_PATH_PROG(ac_qmake, qmake-qt4, [no], $ac_path) -fi -if test "x$ac_qt5" = "xyes"; then +else AC_PATH_PROG(ac_qmake, qmake-qt5, [no], $ac_path) fi if test "x$ac_qmake" = "xno"; then @@ -169,11 +154,14 @@ # Check for proper Qt4/5 major version. ac_qt_version_major=`$ac_qmake -query QT_VERSION | cut -d. -f1` -if test "x$ac_qt4" = "xyes" -a "x$ac_qt_version_major" != "x4"; then - AC_MSG_ERROR([qmake-qt4 $ac_errmsg (qt4-devel)]) -fi -if test "x$ac_qt5" = "xyes" -a "x$ac_qt_version_major" != "x5"; then - AC_MSG_ERROR([qmake-qt5 $ac_errmsg (qt5-devel)]) +if test "x$ac_qt4" = "xyes"; then + if test "x$ac_qt_version_major" != "x4"; then + AC_MSG_ERROR([qmake-qt4 $ac_errmsg (qt4-devel)]) + fi +else + if test "x$ac_qt_version_major" != "x5"; then + AC_MSG_ERROR([qmake-qt5 $ac_errmsg (qt5-devel)]) + fi fi ac_qt_install_bins=`$ac_qmake -query QT_INSTALL_BINS` @@ -207,7 +195,7 @@ if test "x$ac_qt4" = "xyes"; then AC_CACHE_CHECK([for Qt library version >= 4.4], ac_cv_qtversion, [ - AC_TRY_LINK([#include "QtCore/qglobal.h"], [ + AC_TRY_COMPILE([#include "QtCore/qglobal.h"], [ #if QT_VERSION < 0x040400 || QT_VERSION >= 0x050000 #error Qt library 4.4 or greater required. #endif @@ -216,12 +204,10 @@ exit 1 ]) ]) -fi - -if test "x$ac_qt5" = "xyes"; then +else AC_CACHE_CHECK([for Qt library version >= 5.1], ac_cv_qtversion, [ - AC_TRY_LINK([#include "QtCore/qglobal.h"], [ + AC_TRY_COMPILE([#include "QtCore/qglobal.h"], [ #if QT_VERSION < 0x050100 || QT_VERSION >= 0x060000 #error Qt library 5.1 or greater required. #endif @@ -418,6 +404,11 @@ AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.]) fi +# Check for X11 unique/single instance. +if test "x$ac_xunique" = "xyes"; then + AC_DEFINE(CONFIG_XUNIQUE, 1, [Define if X11 unique/single instance is enabled.]) +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.]) @@ -486,6 +477,7 @@ echo " LSCP device MIDI event support . . . . . . . . . .: $ac_device_midi_event" echo " LSCP runtime max. voices / disk streams support .: $ac_max_voices" echo +echo " X11 Unique/Single instance . . . . . . . . . . . .: $ac_xunique" echo " Debugger stack-trace (gdb) . . . . . . . . . . . .: $ac_stacktrace" echo echo " Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"