@@ -1526,7 +1526,7 @@ Optional Features:
15261526 [default=yes]
15271527 --enable-int-vars build finite domain library [default=yes]
15281528 --enable-mpfr build with MPFR support [default=yes]
1529- --enable-qt build with Qt support, requires at least Qt 4.3
1529+ --enable-qt build with Qt support, requires Qt 5 or newer
15301530 [default=yes]
15311531 --enable-gist build Gecode Interactive Search Tool [default=yes]
15321532 --enable-cbs build with support for counting-based search
@@ -7427,10 +7427,9 @@ int
74277427main (void)
74287428{
74297429
7430- #if SIZEOF_INT>=4
7431- #else
7432- blablub
7433- #endif
7430+ #if SIZEOF_INT<4
7431+ choke me
7432+ #endif
74347433
74357434 ;
74367435 return 0;
@@ -7455,10 +7454,9 @@ int
74557454main (void)
74567455{
74577456
7458- #if DBL_MANT_DIG>=53
7459- #else
7460- blablub
7461- #endif
7457+ #if DBL_MANT_DIG<53
7458+ choke me
7459+ #endif
74627460
74637461 ;
74647462 return 0;
@@ -13661,7 +13659,7 @@ then :
1366113659 enableval=$enable_qt ;
1366213660fi
1366313661
13664- for ac_prog in qmake-qt4 qmake
13662+ for ac_prog in qmake6 qmake-qt6 qmake-qt5 qmake5 qmake
1366513663do
1366613664 # Extract the first word of "$ac_prog", so it can be a program name with args.
1366713665set dummy $ac_prog ; ac_word=$2
@@ -13709,7 +13707,7 @@ fi
1370913707 test -n " $QMAKE " && break
1371013708done
1371113709
13712- for ac_prog in moc-qt4 moc
13710+ for ac_prog in moc-qt6 moc6 moc-qt5 moc
1371313711do
1371413712 # Extract the first word of "$ac_prog", so it can be a program name with args.
1371513713set dummy $ac_prog ; ac_word=$2
@@ -13763,19 +13761,23 @@ printf %s "checking whether to build with Qt support... " >&6; }
1376313761 if test " ${QMAKE} x" = " x" -o " ${MOC} x" = " x" ; then
1376413762 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: no" >&5
1376513763printf " %s\n" " no" >&6 ; }
13764+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : WARNING: Qt support requested but qmake/moc were not found. Disabling Qt support." >&5
13765+ printf " %s\n" " $as_me : WARNING: Qt support requested but qmake/moc were not found. Disabling Qt support." >&2 ; }
13766+ enable_qt=no
1376613767 else
13767- ac_gecode_qt_version=` ${QMAKE} -query QT_VERSION`
13768- ac_gecode_qt_major=` echo ${ac_gecode_qt_version} | grep -o ' ^[0-9]*' `
13769- ac_gecode_qt_minor=` echo ${ac_gecode_qt_version} | sed -e ' s/^[0-9]*\\.//g' -e ' s/\\.[0-9]*$//g' `
13768+ ac_gecode_qt_version=` ${QMAKE} -query QT_VERSION 2> /dev/null`
13769+ ac_gecode_qt_major=` echo ${ac_gecode_qt_version} | sed -e ' s/\\..*$//' `
1377013770 ac_gecode_qt_ok=" yes"
13771- if test ${ac_gecode_qt_major} -lt 4; then ac_gecode_qt_ok=" no" ;
13772- else if test ${ac_gecode_qt_major} -eq 4 \
13773- -a ${ac_gecode_qt_minor} -lt 3; then ac_gecode_qt_ok=" no" ;
13774- fi
13775- fi
13771+ case ${ac_gecode_qt_major} in
13772+ ' ' |* [!0-9]* ) ac_gecode_qt_ok=" no" ;;
13773+ * ) if test ${ac_gecode_qt_major} -lt 5; then ac_gecode_qt_ok=" no" ; fi ;;
13774+ esac
1377613775 if test " ${ac_gecode_qt_ok} " ! = " yes" ; then
1377713776 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: no" >&5
1377813777printf " %s\n" " no" >&6 ; }
13778+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : WARNING: Qt support requested but qmake did not report Qt 5/6. Disabling Qt support." >&5
13779+ printf " %s\n" " $as_me : WARNING: Qt support requested but qmake did not report Qt 5/6. Disabling Qt support." >&2 ; }
13780+ enable_qt=no
1377913781 else
1378013782 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: yes" >&5
1378113783printf " %s\n" " yes" >&6 ; }
@@ -13785,9 +13787,7 @@ printf "%s\n" "#define GECODE_HAS_QT /**/" >>confdefs.h
1378513787 ac_gecode_qt_tmpdir=` mktemp -d gistqt.XXXXXX` || exit 1
1378613788 cd ${ac_gecode_qt_tmpdir}
1378713789 echo " CONFIG += release" > a.pro
13788- if test ${ac_gecode_qt_major} -ge 5; then
13789- echo " QT += widgets printsupport" >> a.pro
13790- fi
13790+ echo " QT += core gui widgets printsupport" >> a.pro
1379113791 ${QMAKE}
1379213792 if test -d a.xcodeproj; then
1379313793 ac_gecode_qt_makefile=a.xcodeproj/qt_preprocess.mak
@@ -13806,7 +13806,7 @@ printf "%s\n" "#define GECODE_HAS_QT /**/" >>confdefs.h
1380613806 ac_gecode_qt_inc=` grep ${ac_gecode_qt_makefile} -e ' INCPATH.*=' | sed -e ' s/.*=//' -e ' s|\\\\|/|g' -e ' s|-I\\("*\\)\\.\\./\\.\\.|-I\\1..|g' `
1380713807 ac_gecode_qt_libs=` grep ${ac_gecode_qt_makefile} -e ' LIBS.*=' | sed -e ' s/.*=//' -e ' s|\\\\|/|g' -e ' s|-I\\("*\\)\\.\\./\\.\\.|-I\\1..|g' `
1380813808 if test -d a.xcodeproj -o -d a.pbproj; then
13809- ac_gecode_qt_libs=" -framework QtGui -framework QtCore"
13809+ ac_gecode_qt_libs=" -framework QtWidgets -framework QtPrintSupport -framework QtGui -framework QtCore"
1381013810 fi
1381113811 cd ..
1381213812 rm -r ${ac_gecode_qt_tmpdir}
@@ -13817,14 +13817,12 @@ printf "%s\n" "#define GECODE_HAS_QT /**/" >>confdefs.h
1381713817 QTLIBS=${ac_gecode_qt_libs}
1381813818
1381913819 enable_qt=yes
13820-
13821- enable_qt=yes;
1382213820 fi
1382313821 fi
1382413822 else
1382513823 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: no" >&5
1382613824printf " %s\n" " no" >&6 ; }
13827- enable_qt=no;
13825+ enable_qt=no
1382813826 fi
1382913827 enable_qt=${enable_qt}
1383013828
0 commit comments