/[svn]/qsampler/trunk/configure.ac
ViewVC logotype

Diff of /qsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3004 by capela, Tue Oct 11 15:56:18 2016 UTC revision 3037 by capela, Fri Nov 4 23:54:44 2016 UTC
# Line 1  Line 1 
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.7, rncbc@rncbc.org, qsampler)  AC_INIT(Qsampler, 0.4.1.10, 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)
6  AC_CONFIG_FILES(Makefile qsampler.spec src/src.pri src/qsampler.desktop)  AC_CONFIG_FILES(Makefile qsampler.spec src/src.pri src/qsampler.desktop)
7    
8    # Build date and time.
9    AC_CACHE_VAL([ac_cv_build_date],
10       [ac_cv_build_date=$(date +"%b %d %Y %H:%M %z")])
11    ac_build_date="$ac_cv_build_date"
12    AC_DEFINE_UNQUOTED(CONFIG_BUILD_DATE, ["$ac_build_date"], [Build date and time.])
13    
14  # Sanitize version string.  # Sanitize version string.
15  ac_version=$(echo $PACKAGE_VERSION | sed -r 's/^([0-9|\.]+).*$/\1/')  AC_CACHE_VAL([ac_cv_build_version],
16       [ac_cv_build_version=$(echo $PACKAGE_VERSION | sed -r 's/^([[0-9|\.]]+).*$/\1/')])
17    ac_version="$ac_cv_build_version"
18  AC_SUBST(ac_version)  AC_SUBST(ac_version)
19    
20  # Set default installation prefix.  # Set default installation prefix.
# Line 130  AC_LANG_CPLUSPLUS Line 138  AC_LANG_CPLUSPLUS
138  # Check for pkg-config.  # Check for pkg-config.
139  PKG_PROG_PKG_CONFIG  PKG_PROG_PKG_CONFIG
140    
141    # Check whether -std=c++11 support is necessary (4 < g++ version < 6).
142    AC_CACHE_CHECK([for g++ major version], [ac_cv_gxx_version_major], [
143       ac_cv_gxx_version_major=$($CC -dumpversion)
144       if test -n "$ac_cv_gxx_version_major"; then
145          ac_cv_gxx_version_major=$(echo $ac_cv_gxx_version_major | cut -d'.' -f1);
146       fi
147       ac_gxx_version_major=$(($ac_cv_gxx_version_major + 0))
148    ])
149    ac_gxx_version_major=$ac_cv_gxx_version_major
150    if test $ac_gxx_version_major -gt 4 -a $ac_gxx_version_major -lt 6; then
151       CXXFLAGS="-std=c++11 $CXXFLAGS"
152    fi
153    
154  # Check for proper flags.  # Check for proper flags.
155  ac_arch=`uname -m`  ac_arch=$(uname -m)
156    
157  # Check for install paths and alternatives...  # Check for install paths and alternatives...
158  ac_libdirs="lib"  ac_libdirs="lib"
# Line 179  if test "x$ac_qmake" = "xno"; then Line 200  if test "x$ac_qmake" = "xno"; then
200     AC_MSG_ERROR([qmake $ac_errmsg])     AC_MSG_ERROR([qmake $ac_errmsg])
201  fi  fi
202    
203  # Check for proper Qt4/5 major version.  # Check for proper Qt major version.
204  ac_qt_version_major=`$ac_qmake -query QT_VERSION | cut -d. -f1`  AC_CACHE_CHECK([for Qt major version], [ac_cv_qt_version_major], [
205       ac_cv_qt_version_major=$($ac_qmake -query QT_VERSION | cut -d'.' -f1)
206       ac_cv_qt_version_major=$(($ac_cv_qt_version_major + 0))
207    ])
208    ac_qt_version_major=$ac_cv_qt_version_major
209  if test "x$ac_qt4" = "xyes"; then  if test "x$ac_qt4" = "xyes"; then
210     if test "x$ac_qt_version_major" != "x4"; then     if test $ac_qt_version_major -ne 4; then
211        AC_MSG_ERROR([qmake-qt4 $ac_errmsg (qt4-devel)])        AC_MSG_ERROR([qmake-qt4 $ac_errmsg (qt4-devel)])
212     fi     fi
213  else  else
214     if test "x$ac_qt_version_major" != "x5"; then     if test $ac_qt_version_major -ne 5; then
215        AC_MSG_ERROR([qmake-qt5 $ac_errmsg (qt5-devel)])        AC_MSG_ERROR([qmake-qt5 $ac_errmsg (qt5-devel)])
216     fi     fi
217  fi  fi
218    
219  ac_qt_install_bins=`$ac_qmake -query QT_INSTALL_BINS`  # Check for proper Qt install path.
220  if test -d $ac_qt_install_bins; then  AC_CACHE_CHECK([for Qt install path], [ac_cv_qt_install_path], [
221     ac_path="$ac_qt_install_bins:$ac_path"     ac_cv_qt_install_path=$($ac_qmake -query QT_INSTALL_BINS)
222    ])
223    ac_qt_install_path=$ac_cv_qt_install_path
224    if test -d $ac_qt_install_path; then
225       ac_path="$ac_qt_install_path:$ac_path"
226  fi  fi
227    
228  # Check it again, now with updated PATH, just in case...  # Check it again, now with updated PATH, just in case...
# Line 205  fi Line 234  fi
234    
235  AC_SUBST(ac_qmake)  AC_SUBST(ac_qmake)
236    
237  ac_qt_install_headers=`$ac_qmake -query QT_INSTALL_HEADERS`  AC_CACHE_CHECK([for Qt install headers], [ac_cv_qt_install_headers], [
238       ac_cv_qt_install_headers=$($ac_qmake -query QT_INSTALL_HEADERS)
239    ])
240    ac_qt_install_headers=$ac_cv_qt_install_headers
241  if test -d $ac_qt_install_headers; then  if test -d $ac_qt_install_headers; then
242     CFLAGS="-I$ac_qt_install_headers $CFLAGS "     CFLAGS="-I$ac_qt_install_headers $CFLAGS "
243     CPPFLAGS="-I$ac_qt_install_headers $CPPFLAGS"     CPPFLAGS="-I$ac_qt_install_headers $CPPFLAGS"
244     ac_incpath="$ac_qt_install_headers $ac_incpath"     ac_incpath="$ac_qt_install_headers $ac_incpath"
245  fi  fi
246    
247  ac_qt_install_libs=`$ac_qmake -query QT_INSTALL_LIBS`  AC_CACHE_CHECK([for Qt install libraries], [ac_cv_qt_install_libs], [
248       ac_cv_qt_install_libs=$($ac_qmake -query QT_INSTALL_LIBS)
249    ])
250    ac_qt_install_libs=$ac_cv_qt_install_libs
251  if test -d $ac_qt_install_libs; then  if test -d $ac_qt_install_libs; then
252     LIBS="-L$ac_qt_install_libs $LIBS"     LIBS="-L$ac_qt_install_libs $LIBS"
253     ac_libs="-L$ac_qt_install_libs $ac_libs"     ac_libs="-L$ac_qt_install_libs $ac_libs"
254  fi  fi
255    
256  # Check for proper Qt4/5 version.  # Finally, check for proper Qt4/5 version.
257  if test "x$ac_qt4" = "xyes"; then  if test "x$ac_qt4" = "xyes"; then
258     AC_CACHE_CHECK([for Qt library version >= 4.4],     AC_CACHE_CHECK([for Qt library version >= 4.4],
259        ac_cv_qtversion, [        ac_cv_qtversion, [
# Line 486  AC_OUTPUT Line 521  AC_OUTPUT
521  # Output summary message  # Output summary message
522    
523  echo  echo
524  echo "  $PACKAGE_NAME $PACKAGE_VERSION"  echo "  $PACKAGE_NAME $PACKAGE_VERSION  ($ac_build_date)"
525  echo  echo
526  echo "  Build target . . . . . . . . . . . . . . . . . . .: $ac_debug"  echo "  Build target . . . . . . . . . . . . . . . . . . .: $ac_debug"
527  echo  echo

Legend:
Removed from v.3004  
changed lines
  Added in v.3037

  ViewVC Help
Powered by ViewVC