Author: mir3x Date: Mon Jan 16 14:17:16 2017 New Revision: 34853 URL: http://svn.gna.org/viewcvs/freeciv?rev=34853&view=rev Log: Decide minimum version of Qt supported Reported by Jacob Nevins <jtn>
See bug #25343 Modified: branches/S2_6/doc/README.packaging branches/S2_6/m4/qt5.m4 Modified: branches/S2_6/doc/README.packaging URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.packaging?rev=34853&r1=34852&r2=34853&view=diff ============================================================================== --- branches/S2_6/doc/README.packaging (original) +++ branches/S2_6/doc/README.packaging Mon Jan 16 14:17:16 2017 @@ -18,6 +18,7 @@ generated by Freeciv version <= 2.1). * gtk3-client is now the default client * Minimum gtk3 requirement for building gtk3-client is now 3.8. +* Minimum qt requirement for building qt-client and freeciv-ruledit is 5.2. * There's new gtk3.22-client that has gtk+-3.22 as requirement. It can be built with --enable-client=gtk3.22 * There's new experimental sdl2-client. It can be built with Modified: branches/S2_6/m4/qt5.m4 URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/m4/qt5.m4?rev=34853&r1=34852&r2=34853&view=diff ============================================================================== --- branches/S2_6/m4/qt5.m4 (original) +++ branches/S2_6/m4/qt5.m4 Mon Jan 16 14:17:16 2017 @@ -62,10 +62,15 @@ done]) fi - AC_LANG_POP([C++]) - if test "x$qt5_libs" = "xyes" ; then AC_MSG_RESULT([found]) + AC_MSG_CHECKING([for Qt >= 5.2]) + FC_QT52_CHECK + fi + + AC_LANG_POP([C++]) + if test "x$fc_qt52" = "xyes" ; then + AC_MSG_RESULT([ok]) FC_QT5_VALIDATE_MOC([fc_qt5_usable=true], [fc_qt5_usable=false]) else AC_MSG_RESULT([not found]) @@ -99,6 +104,30 @@ CPPFLAGS="$CPPFLAGS_SAVE" ]) + +dnl Check if the included version of Qt is at least Qt5.2 +dnl Output: fc_qt52=yes|no +AC_DEFUN([FC_QT52_CHECK], +[ + CPPFLAGS_SAVE="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $FC_QT5_CPPFLAGS" + CXXFLAGS_SAVE="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $FC_QT5_CXXFLAGS" + LIBS_SAVE="$LIBS" + LIBS="${LIBS}${LIBSADD}" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include <QtCore>]],[[ + #if QT_VERSION < 0x050200 + fail + #endif + ]])], + [fc_qt52=yes], + [fc_qt52=no]) + LIBS="$LIBS_SAVE" + CPPFLAGS="${CPPFLAGS_SAVE}" + CXXFLAGS="${CXXFLAGS_SAVE}" +]) + dnl Test Qt application linking with current flags AC_DEFUN([FC_QT5_LINKTEST], _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits