Author: cazfi Date: Sat Mar 7 22:19:25 2015 New Revision: 28447 URL: http://svn.gna.org/viewcvs/freeciv?rev=28447&view=rev Log: Made configure to consider failure to find Qt headers or libs from explicitly given path fatal one. Also do not check any additional paths. Previously it was possible that it ended up using versions other than user intended, even when the correct one was found.
See bug #23348 Modified: branches/S2_6/m4/qt5.m4 Modified: branches/S2_6/m4/qt5.m4 URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/m4/qt5.m4?rev=28447&r1=28446&r2=28447&view=diff ============================================================================== --- branches/S2_6/m4/qt5.m4 (original) +++ branches/S2_6/m4/qt5.m4 Sat Mar 7 22:19:25 2015 @@ -8,22 +8,25 @@ AC_ARG_WITH([qt5-includes], AS_HELP_STRING([--with-qt5-includes], [path to Qt5 includes]), - [FC_QT5_COMPILETEST([$withval])], + [FC_QT5_COMPILETEST([$withval]) + qt5_hdr_check_finish=true], [POTENTIAL_PATHS="/usr/include /usr/include/qt5" -# search multiarch paths too (if the multiarch tuple can be found) -FC_MULTIARCH_TUPLE() -AS_IF(test "x$MULTIARCH_TUPLE" != "x", - POTENTIAL_PATHS="$POTENTIAL_PATHS /usr/include/$MULTIARCH_TUPLE/qt5") + if test "x$qt5_hdr_check_finish" != "xtrue" ; then + # search multiarch paths too (if the multiarch tuple can be found) + FC_MULTIARCH_TUPLE() + AS_IF(test "x$MULTIARCH_TUPLE" != "x", + POTENTIAL_PATHS="$POTENTIAL_PATHS /usr/include/$MULTIARCH_TUPLE/qt5") -dnl First test without any additional include paths to see if it works already -FC_QT5_COMPILETEST -for TEST_PATH in $POTENTIAL_PATHS -do - if test "x$qt5_headers" != "xyes" ; then - FC_QT5_COMPILETEST($TEST_PATH) + dnl First test without any additional include paths to see if it works already + FC_QT5_COMPILETEST + for TEST_PATH in $POTENTIAL_PATHS + do + if test "x$qt5_headers" != "xyes" ; then + FC_QT5_COMPILETEST($TEST_PATH) + fi + done]) fi -done]) if test "x$qt5_headers" = "xyes" ; then AC_MSG_RESULT([found]) @@ -31,23 +34,25 @@ AC_MSG_CHECKING([Qt5 libraries]) AC_ARG_WITH([qt5-libs], AS_HELP_STRING([--with-qt5-libs], [path to Qt5 libraries]), - [FC_QT5_LINKTEST([$withval])], + [FC_QT5_LINKTEST([$withval]) + qt5_lib_check_finish=true], [POTENTIAL_PATHS="/usr/lib/qt5" -# search multiarch paths too (if the multiarch tuple can be found) -FC_MULTIARCH_TUPLE() -AS_IF(test "x$MULTIARCH_TUPLE" != "x", - POTENTIAL_PATHS="$POTENTIAL_PATHS /usr/lib/$MULTIARCH_TUPLE/qt5") + if test "x$qt5_lib_check_finish" != "xtrue" ; then + # search multiarch paths too (if the multiarch tuple can be found) + FC_MULTIARCH_TUPLE() + AS_IF(test "x$MULTIARCH_TUPLE" != "x", + POTENTIAL_PATHS="$POTENTIAL_PATHS /usr/lib/$MULTIARCH_TUPLE/qt5") -dnl First test without any additional library paths to see if it works already -FC_QT5_LINKTEST -for TEST_PATH in $POTENTIAL_PATHS -do - if test "x$qt5_libs" != "xyes" ; then - FC_QT5_LINKTEST($TEST_PATH) - fi -done]) - + dnl First test without any additional library paths to see if it works already + FC_QT5_LINKTEST + for TEST_PATH in $POTENTIAL_PATHS + do + if test "x$qt5_libs" != "xyes" ; then + FC_QT5_LINKTEST($TEST_PATH) + fi + done]) + fi fi AC_LANG_POP([C++]) _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits