diff --git a/mythtv/configure b/mythtv/configure
index 8b7ba2ed6f..2d6bb8af70 100755
a
|
b
|
enable_weak_pic() { |
6099 | 6099 | |
6100 | 6100 | enabled pic && enable_weak_pic |
6101 | 6101 | |
6102 | | is_qmake5(){ |
6103 | | $1 --version 2>&1 | egrep -q -e "Qt version 5\.[2-9]\.[0-9]" |
| 6102 | version2string(){ |
| 6103 | # accepts version as in 1.10.4 and turns it into 0001.0010.0004.0000.0000 which can be compared as a string |
| 6104 | echo $1 | awk -F. '{ printf("%04d.%04d.%04d.%04d.%04d", $1, $2, $3, $4, $5); };' |
6104 | 6105 | } |
6105 | 6106 | |
| 6107 | # Minimum supported Qt version |
| 6108 | qt_minimum_version="5.7.1" |
| 6109 | |
6106 | 6110 | # qmake-qt5 /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake |
6107 | 6111 | if [ x"$qmake" = "xqmake" ]; then |
6108 | | CHECK_QMAKE=`which qmake-qt5 2>&1`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake `which $qmake 2>&1`" |
| 6112 | CHECK_QMAKE=`which -a qmake-qt5 2>/dev/null`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake `which -a $qmake 2>/dev/null`" |
6109 | 6113 | else |
6110 | | CHECK_QMAKE=`which $qmake 2>&1`" "`which qmake-qt5 2>&1`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake" |
| 6114 | CHECK_QMAKE=`which -a $qmake 2>/dev/null`" "`which -a qmake-qt5 2>/dev/null`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake" |
6111 | 6115 | fi |
6112 | 6116 | # try to find a qt5 qmake to use |
6113 | 6117 | found_qmake='' |
6114 | 6118 | for i in $CHECK_QMAKE; do |
6115 | 6119 | if test -e $i ; then |
6116 | | if is_qmake5 $i; then |
| 6120 | qmake_version=`$i --version | sed -n "s/.*Qt version \([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/p"` |
| 6121 | if ! [ $(version2string $qmake_version) \< $(version2string $qt_minimum_version) ]; then |
6117 | 6122 | found_qmake=$i |
6118 | 6123 | check_cxxflags -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 |
6119 | 6124 | break; |
… |
… |
for i in $CHECK_QMAKE; do |
6124 | 6129 | fi |
6125 | 6130 | done |
6126 | 6131 | if [ x"$found_qmake" = "x" ]; then |
6127 | | die "qmake for Qt5.2 or newer not found.\nPlease specify the correct qmake with --qmake=" |
| 6132 | die "qmake for Qt version $qt_minimum_version or newer not found. Please specify the correct qmake with --qmake=" |
6128 | 6133 | else |
6129 | 6134 | qmake=$found_qmake |
6130 | 6135 | fi |