Description: configure for Qt5
Author: Laurence Abbott <laurence.abbott@york.ac.uk> 
Tested-By: Christian T. Steigies <cts@debian.org>
Last-Update: 2019-08-29
Index: gle-graphics/configure.ac
===================================================================
--- gle-graphics.orig/configure.ac
+++ gle-graphics/configure.ac
@@ -102,7 +102,7 @@ EXTRA_LDFLAGS=
 EXTRA_LIBS=
 SIMPLE_LIBS_DL=
 
-AC_ARG_WITH(qt,           [  --with-qt[=DIR]           where to find the Qt-4.1.x library (or yes/no)],,with_qt=yes)
+AC_ARG_WITH(qt,           [  --with-qt[=DIR]           where to find the Qt-5.1.x library (or yes/no)],,with_qt=yes)
 AC_ARG_WITH(jpeg,         [  --with-jpeg[=DIR]         where to find the jpeg library (or yes/no)],,with_jpeg=yes)
 AC_ARG_WITH(png,          [  --with-png[=DIR]          where to find the png library (or yes/no)],,with_png=yes)
 AC_ARG_WITH(tiff,         [  --with-tiff[=DIR]         where to find the tiff library (or yes/no)],,with_tiff=yes)
@@ -602,45 +602,45 @@ if test "x$HAVE_CAIRO" = "x1"; then
 fi
 
 dnl ********************************************************************************
-dnl check Qt 4.1.x
+dnl check Qt 5.1.x
 dnl ********************************************************************************
 
-QT4VER="?"
+QT5VER="?"
 QMAKE_PROG="none"
 if test "x$with_qt" != "xno"; then
     if test "x$with_qt" = "xyes"; then
         if test "x$PKG_CONFIG" != "x"; then
-            QT4LOC=`$PKG_CONFIG QtCore --variable=exec_prefix`
-            if test -x $QT4LOC/bin/qmake; then
-                if $PKG_CONFIG QtCore --atleast-version 4.1.1; then
-                    with_qt=$QT4LOC
-                    QT4VER=`$PKG_CONFIG QtCore --modversion`
+            QT5LOC=`$PKG_CONFIG QtCore --variable=exec_prefix`
+            if test -x $QT5LOC/bin/qmake; then
+                if $PKG_CONFIG QtCore --atleast-version 5.1.1; then
+                    with_qt=$QT5LOC
+                    QT5VER=`$PKG_CONFIG QtCore --modversion`
                 fi
             fi
         fi
     fi
     if test "x$with_qt" = "xyes"; then
-        if test -x /opt/qt4/bin/qmake; then
-           with_qt=/opt/qt4
+        if test -x /opt/qt5/bin/qmake; then
+           with_qt=/opt/qt5
         fi
-        if test -x /usr/lib/qt4/bin/qmake; then
-           with_qt=/usr/lib/qt4
+        if test -x /usr/lib/qt5/bin/qmake; then
+           with_qt=/usr/lib/qt5
         fi
-        AC_PATH_PROG([QMAKE_PROG], [qmake-qt4], [none], [$PATH])
+        AC_PATH_PROG([QMAKE_PROG], [qmake-qt5], [none], [$PATH])
     fi
     if test "x$with_qt" != "xyes"; then
        QTDIR=$with_qt
 	   if test -x $with_qt/bin/qmake; then
 		   QMAKE_PROG=$with_qt/bin/qmake
 	   fi
-	   if test -x $with_qt/bin/qmake-qt4; then
-		   QMAKE_PROG=$with_qt/bin/qmake-qt4
+	   if test -x $with_qt/bin/qmake-qt5; then
+		   QMAKE_PROG=$with_qt/bin/qmake-qt5
 	   fi
 	   if test -x $with_qt/bin/qmake.exe; then
 		   QMAKE_PROG=$with_qt/bin/qmake.exe
 	   fi
 	   if test "x$QMAKE_PROG" = "xnone"; then
-	      AC_PATH_PROGS([QMAKE_PROG], [qmake-qt4 qmake], [none], [$QTDIR/bin:$PATH])
+	      AC_PATH_PROGS([QMAKE_PROG], [qmake-qt5 qmake], [none], [$QTDIR/bin:$PATH])
        fi
     fi
     if test "x$QMAKE_PROG" != "xnone"; then
@@ -997,8 +997,8 @@ fi
 AC_MSG_RESULT([])
 
 if test "$HAVE_QT" = 1; then
-  if test "x$QT4VER" != "x?"; then
-     AC_MSG_RESULT([   ** GLE GUI support: yes (Qt4 version: $QT4VER)])
+  if test "x$QT5VER" != "x?"; then
+     AC_MSG_RESULT([   ** GLE GUI support: yes (Qt4 version: $QT5VER)])
   else
      AC_MSG_RESULT([   ** GLE GUI support: yes])
      if test "x$QMAKE_VERS" != "xnone"; then
@@ -1007,7 +1007,7 @@ if test "$HAVE_QT" = 1; then
   fi
 else
   AC_MSG_RESULT([   ** GLE GUI support: no])
-  AC_MSG_RESULT([      (make sure you have Qt >= 4.1.1 devel and use ./configure --with-qt=/path/to/qt.)])
+  AC_MSG_RESULT([      (make sure you have Qt >= 5.1.1 devel and use ./configure --with-qt=/path/to/qt.)])
 fi
 
 AC_MSG_RESULT([])
