]> git.lyx.org Git - lyx.git/commitdiff
Add a test to configure for minimal Qt version
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 19 Mar 2013 11:59:38 +0000 (12:59 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 19 Mar 2013 11:59:38 +0000 (12:59 +0100)
* use AS_COMPARE_VERSION to check whether the Qt version is correct.
* upgrade minimal requirement for autoconf to version 2.60 (released in 2006!).

autogen.sh
config/lyxinclude.m4
config/qt4.m4
configure.ac

index 8afd4bfd78d64e45ff433d7af07d6342b511fe64..a12f744542194c460b55f49b9930e71a5c2210fd 100755 (executable)
@@ -32,17 +32,17 @@ autoversion=`$AUTOCONF --version 2>/dev/null | head -n 1`
 test "$autoversion" != "" && {
     echo "Using $autoversion"
 } || {
-    echo "LyX requires autoconf >= 2.59c"
+    echo "LyX requires autoconf >= 2.60"
     exit 1
 }
 
 
 case $autoversion in
-    *' '2.59d|*' '2.60[ab]|*' '2.6[0-9])
+    *' '2.60[ab]|*' '2.6[0-9])
        ;;
     *)
        echo "This autoconf version is not supported by LyX."
-       echo "LyX only supports autoconf 2.59d-2.69."
+       echo "LyX only supports autoconf 2.60-2.69."
        exit 1
        ;;
 esac
index 2e529ea22121254980535454fc584abfbd43c660..a21ce0a6fc2c35847de4012f0731f207b6a5eed1 100644 (file)
@@ -547,9 +547,6 @@ AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
 AM_CONDITIONAL(INSTALL_WINDOWS, $lyx_install_windows)
 AM_CONDITIONAL(INSTALL_CYGWIN, $lyx_install_cygwin)
 AM_CONDITIONAL(INSTALL_POSIX, $lyx_install_posix)
-dnl Next two lines are only for autoconf <= 2.59
-datadir='${datarootdir}'
-AC_SUBST(datarootdir)
 AC_SUBST(pkgdatadir)
 AC_SUBST(program_suffix)
 ])
index 3114341051d374fdd5e64092370f3532e1dbc7c2..2fd66b450397898b8631660bb23b1b038aa1e1e2 100644 (file)
@@ -140,6 +140,12 @@ AC_DEFUN([QT4_DO_IT_ALL],
        if test "$pkg_failed" != "no" ; then
                QT4_DO_MANUAL_CONFIG
        fi
+
+       dnl Check qt version
+       AS_VERSION_COMPARE($QT4_VERSION, $1, 
+       [LYX_ERROR([LyX requires version $1 of Qt. Only version $QT4_VERSION has been found.])
+       ])
+
        AC_PATH_PROGS(MOC4, [moc-qt4 moc],[],$qt4_cv_bin:$PATH)
        AC_PATH_PROGS(UIC4, [uic-qt4 uic],[],$qt4_cv_bin:$PATH)
        AC_PATH_PROGS(RCC4, [rcc-qt4 rcc],[],$qt4_cv_bin:$PATH)
index ae3ba025ad7bd78b410cfd746d40624d4943d7ca..0c4d833c765e78ed7819a2837dffae28c77dd872 100644 (file)
@@ -3,7 +3,7 @@ dnl Process with autoconf to generate configure script   -*- sh -*-
 AC_INIT(LyX,2.1.0dev,[lyx-devel@lists.lyx.org],[lyx])
 # Use ISO format only. The frontend needs to parse this
 AC_SUBST(LYX_DATE, ["2011-04-29"])
-AC_PREREQ(2.52)
+AC_PREREQ(2.60)
 AC_CONFIG_SRCDIR(src/main.cpp)
 AC_CONFIG_HEADERS([config.h])
 
@@ -133,7 +133,7 @@ dnl problems with the AC_REQUIRE contained in QT4_DO_IT_ALL.
 for frontend in $FRONTENDS ; do
   case "$frontend" in
     qt4)
-         QT4_DO_IT_ALL
+         QT4_DO_IT_ALL([4.5.0])
          FRONTENDS_PROGS="$FRONTENDS_PROGS lyx-qt4\$(EXEEXT)"
          FRONTENDS_SUBDIRS="$FRONTENDS_SUBDIRS qt4"
          RPM_FRONTEND="qt4"