--- qsampler/trunk/configure.ac 2014/01/23 04:00:26 2510 +++ qsampler/trunk/configure.ac 2014/01/24 16:34:11 2511 @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(Qsampler, 0.2.3, rncbc@rncbc.org, qsampler) +AC_INIT(Qsampler, 0.2.3.1, rncbc@rncbc.org, qsampler) AC_CONFIG_SRCDIR(src/qsampler.cpp) AC_CONFIG_HEADERS(src/config.h) @@ -48,6 +48,7 @@ ac_qt4="no" fi + # Enable libgig availability. AC_ARG_ENABLE(libgig, AC_HELP_STRING([--enable-libgig], [enable libgig interface (default=yes)]), @@ -60,29 +61,9 @@ [ac_stacktrace="$enableval"]) -if test "$cross_compiling" != yes; then # Standard installation base dirs. ac_with_paths="/usr /usr/local" -ac_qtdirs="qt" - -if test "x$ac_qt4" = "xyes"; then - ac_qtdirs="qt4 $ac_qtdirs" -fi -if test "x$ac_qt5" = "xyes"; then - ac_qtdirs="qt5 $ac_qtdirs" -fi - -# Some a-la-debian alternatives... -for X in /usr/lib /usr/lib64 /usr/share; do - for Y in $ac_qtdirs; do - if test -d $X/$Y/bin; then - ac_with_paths="$ac_with_paths $X/$Y" - fi - done -done -fi - # Set for alternate Qt installation dir. AC_ARG_WITH(qt, AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]), @@ -109,6 +90,36 @@ AC_LANG_C AC_LANG_CPLUSPLUS + +# Check for proper flags. +ac_arch=`uname -m` + +# Check for some a-la-debian alternatives... +ac_qtdirs="qt" + +if test "x$ac_qt4" = "xyes"; then + ac_qtdirs="qt4 $ac_qtdirs" +fi +if test "x$ac_qt5" = "xyes"; then + ac_qtdirs="qt5 $ac_qtdirs" +fi + +ac_topdirs="/usr/share /usr/lib" + +if test "x$ac_arch" = "xx86_64"; then + CFLAGS="-fPIC $CFLAGS" + CPPFLAGS="-fPIC $CPPFLAGS" + ac_topdirs="$ac_topdirs /usr/lib64" +fi + +for X in $ac_topdirs; do + for Y in $ac_qtdirs; do + if test -d $X/$Y/bin; then + ac_with_paths="$X/$Y $ac_with_paths" + fi + done +done + # Prepend alternate dependencies paths. ac_path=$PATH for X in $ac_with_paths; do @@ -130,7 +141,7 @@ CPPFLAGS="-I$X/include $CPPFLAGS" ac_incpath="$X/include $ac_incpath" fi - if test -d $X/lib64; then + if test "x$ac_arch" = "xx86_64" -a -d $X/lib64; then LIBS="-L$X/lib64 $LIBS" ac_libs="-L$X/lib64 $ac_libs" fi @@ -140,12 +151,6 @@ fi done -# Check for proper flags. -ac_arch=`uname -m` -if test "x$ac_arch" = "xx86_64"; then - CFLAGS="-fPIC $CFLAGS" - CPPFLAGS="-fPIC $CPPFLAGS" -fi # Check for proper Qt version. AC_CACHE_CHECK([for Qt library version >= 4.4], @@ -160,6 +165,7 @@ ]) ]) + # A common error message: ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)."