mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-21 21:06:23 +00:00
autoconf: remove support for compiling against Qt4
Most of the changes consist in assuming that USE_QT5=yes. Update INSTALL and README accordingly.
This commit is contained in:
parent
db70aec262
commit
4310430a38
15
INSTALL
15
INSTALL
@ -52,18 +52,17 @@ You will also probably need GNU m4 (perhaps installed as gm4).
|
||||
Requirements
|
||||
------------
|
||||
|
||||
First of all, you will need a C++11 standard conforming compiler, like gcc (at
|
||||
least 4.9) or clang.
|
||||
First of all, you will need a C++11 standard conforming compiler, like g++ (at
|
||||
least 4.9, to have proper srd::regex) or clang++.
|
||||
|
||||
LyX makes great use of the C++ Standard Template Library (STL).
|
||||
This means that gcc users will have to install the relevant libstdc++
|
||||
library to be able to compile this version of LyX.
|
||||
|
||||
For full LyX usability we suggest to use Qt 5.6 and higher, or at the
|
||||
very least Qt 5.4. For compilation you need to compile against at least
|
||||
Qt 4.8 which has been widely tested, and for Windows we advise at least
|
||||
Qt 4.8.4. The only special point to make is that you must ensure that
|
||||
both LyX and the Qt libraries are compiled with the same C++ compiler.
|
||||
very least Qt 5.4. It is also possible to compile against Qt 6.The
|
||||
only special point to make is that you must ensure that both LyX and
|
||||
the Qt libraries are compiled with the same C++ compiler.
|
||||
|
||||
To build LyX with spell checking capabilities included you have to
|
||||
install at least one of the development packages of the spell checker
|
||||
@ -124,8 +123,8 @@ flags:
|
||||
|
||||
The `gprof' build type compiles and links with -pg option with gcc.
|
||||
|
||||
o --disable-qt5 that forces configuration with Qt 4.x when Qt 5.x is
|
||||
also available. By default Qt5 is tried first, and then Qt4.
|
||||
o --enable-qt6 that checks configuration with Qt 6.x, and then Qt
|
||||
5.x. By default, only Qt5 is tried.
|
||||
|
||||
o --with-extra-lib=DIRECTORY that specifies the path where LyX will
|
||||
find extra libraries (like Qt) it needs. Defaults to NONE
|
||||
|
3
README
3
README
@ -91,8 +91,7 @@ What do I need to compile LyX from the source distribution?
|
||||
need at least gcc 4.9.
|
||||
|
||||
* The Qt library, at least version 5.2 (5.6 recommended). It is
|
||||
still possible to compile with Qt 4.8, but this is not
|
||||
recommended.
|
||||
also possible to compile with Qt 6.x.
|
||||
|
||||
Read the file "INSTALL" for more information on compiling.
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
Things left to do after killing Qt4 (obtained by grepping for Qt4 and 'Qt 4'):
|
||||
* look at the FIXME KILLQT4 comments in src/ and resolve them
|
||||
* update README
|
||||
* update INSTALL
|
||||
* update INSTALL.cmake
|
||||
* update INSTALL.MacOSX
|
||||
* update autoconf
|
||||
* update cmake
|
||||
* check whether development/autotests/keytest.py really needs QT4
|
||||
investigate references to Qt4 in keytest
|
||||
|
@ -74,18 +74,6 @@ AC_MSG_RESULT([$USE_QT6])
|
||||
AC_SUBST([USE_QT6])
|
||||
])
|
||||
dnl
|
||||
AC_DEFUN([LYX_CHECK_QT5],[
|
||||
AC_MSG_CHECKING([whether Qt5 is disabled])
|
||||
AC_ARG_ENABLE([qt5],
|
||||
[AS_HELP_STRING([--disable-qt5],[do not use Qt5 for building])],
|
||||
USE_QT5=$enableval, USE_QT5=yes)
|
||||
if test x$USE_QT5 != xno ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
AC_SUBST([USE_QT5])
|
||||
])
|
||||
|
||||
|
||||
dnl Usage: LYX_WARNING(message) Displays the warning "message" and sets the
|
||||
@ -381,9 +369,8 @@ if test x$GXX = xyes; then
|
||||
AM_CXXFLAGS="$AM_CXXFLAGS -fno-omit-frame-pointer"
|
||||
fi
|
||||
|
||||
if test x$USE_QT5 = xyes -o x$USE_QT6 = xyes; then
|
||||
AS_CASE([$host], [*mingw*|*cygwin*], [], [AM_CXXFLAGS="-fPIC $AM_CXXFLAGS"])
|
||||
fi
|
||||
AS_CASE([$host], [*mingw*|*cygwin*], [], [AM_CXXFLAGS="-fPIC $AM_CXXFLAGS"])
|
||||
|
||||
dnl Warnings are for preprocessor too
|
||||
if test x$enable_warnings = xyes ; then
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra"
|
||||
|
78
config/qt.m4
78
config/qt.m4
@ -29,7 +29,7 @@ AC_DEFUN([QT_CHECK_COMPILE],
|
||||
if test $USE_QT6 = "yes" ; then
|
||||
qt_corelibs="-lQt6Core -lQt6Core5Compat"
|
||||
qt_guilibs="-lQt6Core -lQt6Core5Compat -lQt6Concurrent -lQt6Gui -lQt6Svg -lQt6Widgets"
|
||||
elif test $USE_QT5 = "yes" ; then
|
||||
else
|
||||
qt_corelibs="-lQt5Core"
|
||||
qt_guilibs="-lQt5Core -lQt5Concurrent -lQt5Gui -lQt5Svg -lQt5Widgets"
|
||||
fi
|
||||
@ -58,8 +58,6 @@ AC_DEFUN([QT_CHECK_COMPILE],
|
||||
if test -z "$qt_cv_libname"; then
|
||||
if test x$USE_QT6 = xyes ; then
|
||||
AC_MSG_RESULT([failed, retrying with Qt5])
|
||||
elif test x$USE_QT5 = xyes ; then
|
||||
AC_MSG_RESULT([failed, retrying with Qt4])
|
||||
else
|
||||
AC_MSG_RESULT([failed])
|
||||
AC_MSG_ERROR([cannot compile a simple Qt executable. Check you have the right \$QTDIR.])
|
||||
@ -73,11 +71,9 @@ AC_DEFUN([QT_CHECK_COMPILE],
|
||||
AC_DEFUN([QT_FIND_TOOL],
|
||||
[
|
||||
$1=
|
||||
qt_major=4
|
||||
qt_major=5
|
||||
if test "x$USE_QT6" != "xno" ; then
|
||||
qt_major=6
|
||||
elif test "x$USE_QT5" != "xno" ; then
|
||||
qt_major=5
|
||||
fi
|
||||
qt_ext="qt$qt_major"
|
||||
|
||||
@ -191,23 +187,7 @@ AC_DEFUN([QT_DO_IT_ALL],
|
||||
dnl Try again with Qt5 and then Qt4 if configuring for Qt6/5 fails
|
||||
if test x$USE_QT6 = xyes ; then
|
||||
USE_QT6=no
|
||||
USE_QT5=yes
|
||||
AC_SUBST([USE_QT6])
|
||||
AC_SUBST([USE_QT5])
|
||||
if test -n "$PKG_CONFIG" ; then
|
||||
QT_DO_PKG_CONFIG
|
||||
fi
|
||||
if test "$pkg_failed" != "no" ; then
|
||||
QT_DO_MANUAL_CONFIG
|
||||
fi
|
||||
if test -z "$QT_LIB"; then
|
||||
AC_MSG_ERROR([cannot find qt libraries.])
|
||||
fi
|
||||
elif test x$USE_QT5 = xyes ; then
|
||||
USE_QT6=no
|
||||
USE_QT5=no
|
||||
AC_SUBST([USE_QT6])
|
||||
AC_SUBST([USE_QT5])
|
||||
if test -n "$PKG_CONFIG" ; then
|
||||
QT_DO_PKG_CONFIG
|
||||
fi
|
||||
@ -246,25 +226,13 @@ AC_DEFUN([QT_DO_IT_ALL],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(QPA_XCB, 1, [Define if Qt uses the X Window System])],
|
||||
[AC_MSG_RESULT(no)])
|
||||
elif test x$USE_QT5 = xyes ; then
|
||||
else
|
||||
AC_EGREP_CPP(xcb,
|
||||
[#include <$lyx_qt5_config>
|
||||
QT_QPA_DEFAULT_PLATFORM_NAME],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(QPA_XCB, 1, [Define if Qt uses the X Window System])],
|
||||
[AC_MSG_RESULT(no)])
|
||||
else
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([
|
||||
[#include <qglobal.h>],
|
||||
[#ifndef Q_WS_X11],
|
||||
[#error Fail],
|
||||
[#endif]])],
|
||||
qt_use_x11=yes,
|
||||
qt_use_x11=no)
|
||||
AC_MSG_RESULT($qt_use_x11)
|
||||
if test "x$qt_use_x11" = "xyes"; then
|
||||
QT_LIB="$QT_LIB -lX11"
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
|
||||
@ -287,28 +255,24 @@ AC_DEFUN([QT_DO_PKG_CONFIG],
|
||||
PKG_CONFIG_PATH=$qt_cv_dir/lib:$qt_cv_dir/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
export PKG_CONFIG_PATH
|
||||
fi
|
||||
qt_corelibs="QtCore"
|
||||
qt_guilibs="QtCore QtGui QtSvg"
|
||||
if test "x$USE_QT5" != "xno" ; then
|
||||
qt_corelibs="Qt5Core"
|
||||
qt_guilibs="Qt5Core Qt5Concurrent Qt5Gui Qt5Svg Qt5Widgets"
|
||||
lyx_use_x11extras=false
|
||||
PKG_CHECK_EXISTS(Qt5X11Extras, [lyx_use_x11extras=true], [])
|
||||
if $lyx_use_x11extras; then
|
||||
qt_guilibs="$qt_guilibs Qt5X11Extras xcb"
|
||||
AC_DEFINE(HAVE_QT5_X11_EXTRAS, 1,
|
||||
[Define if you have the Qt5X11Extras module])
|
||||
fi
|
||||
lyx_use_winextras=false
|
||||
PKG_CHECK_EXISTS(Qt5WinExtras, [lyx_use_winextras=true], [])
|
||||
if $lyx_use_winextras; then
|
||||
qt_guilibs="$qt_guilibs Qt5WinExtras"
|
||||
fi
|
||||
lyx_use_macextras=false
|
||||
PKG_CHECK_EXISTS(Qt5MacExtras, [lyx_use_macextras=true], [])
|
||||
if $lyx_use_macextras; then
|
||||
qt_guilibs="$qt_guilibs Qt5MacExtras"
|
||||
fi
|
||||
qt_corelibs="Qt5Core"
|
||||
qt_guilibs="Qt5Core Qt5Concurrent Qt5Gui Qt5Svg Qt5Widgets"
|
||||
lyx_use_x11extras=false
|
||||
PKG_CHECK_EXISTS(Qt5X11Extras, [lyx_use_x11extras=true], [])
|
||||
if $lyx_use_x11extras; then
|
||||
qt_guilibs="$qt_guilibs Qt5X11Extras xcb"
|
||||
AC_DEFINE(HAVE_QT5_X11_EXTRAS, 1,
|
||||
[Define if you have the Qt5X11Extras module])
|
||||
fi
|
||||
lyx_use_winextras=false
|
||||
PKG_CHECK_EXISTS(Qt5WinExtras, [lyx_use_winextras=true], [])
|
||||
if $lyx_use_winextras; then
|
||||
qt_guilibs="$qt_guilibs Qt5WinExtras"
|
||||
fi
|
||||
lyx_use_macextras=false
|
||||
PKG_CHECK_EXISTS(Qt5MacExtras, [lyx_use_macextras=true], [])
|
||||
if $lyx_use_macextras; then
|
||||
qt_guilibs="$qt_guilibs Qt5MacExtras"
|
||||
fi
|
||||
PKG_CHECK_MODULES(QT_CORE, $qt_corelibs,,[:])
|
||||
if test "$pkg_failed" = "no" ; then
|
||||
|
@ -14,9 +14,6 @@ AC_CONFIG_AUX_DIR(config)
|
||||
LYX_CHECK_VERSION
|
||||
LYX_VERSION_SUFFIX
|
||||
LYX_CHECK_QT6
|
||||
if test x$USE_QT6 = xno ; then
|
||||
LYX_CHECK_QT5
|
||||
fi
|
||||
# Check how the files should be packaged
|
||||
AC_CANONICAL_TARGET
|
||||
LYX_USE_PACKAGING
|
||||
|
Loading…
Reference in New Issue
Block a user