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
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
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
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"
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
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.])
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"
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
[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
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