Commit Graph

592 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
09684899d6 Clean up after removal of strfwd.h
Remove autoconf tests for whether std::string uses COW, since this is
forbidden by C++11 standard.

Forbid the use of gcc 4.9 (which still uses COW).

Remove code in debug.h that added forward declarations for LLVM's
libc++, since we do not do forward declarations anymore.

Remove configure test for libc++.
2024-10-05 15:15:21 +02:00
Jean-Marc Lasgouttes
18c310a8cf Get rid of QPA_XCB define
Since the platform is selected at run time (e.g. xcb vs. Wayland), it
is not a good idea to decide at compile time what code is run. Another
example is on macOS, where having xcb libraries available will lead to
lauching the Xquartz whenever LyX is running.

With this patch, things are separated:
- the code is run when run-time platform is "xcb".
- the support code is compiled in when xcb header and libraries are
  available.

Fixes ticket #13086.
2024-08-30 11:27:17 +02:00
Jean-Marc Lasgouttes
d7ba7bceb3 Revert "Fix bug #13069."
This reverts commit fafe3ea5d7.
2024-07-22 20:53:29 +02:00
Richard Kimberly Heck
562f92f272 Fix up fafe3ea5d7.
There was a merge conflict, and it looks like I didn't fix it right.

I had set the author of that commit to Alexander, but for some
reason it didn't stick?
2024-06-23 12:48:17 -04:00
Richard Kimberly Heck
fafe3ea5d7 Fix bug #13069.
Use XML parser to handle <mtext> issues.

Some of the config/qt.m4 code by JMarc.
2024-06-23 12:37:25 -04:00
Enrico Forestieri
66ef66ca0d Avoid bogus warnings when configuring for Qt6
Recent versions of qmake complain loudly when the locale
does not explicitley specify the utf8 codeset. Specifically,
the configure script exports LC_ALL=C and that implies the
ascii codeset. Previously, this was silently changed to utf8,
whereas now we get a warning for each qmake invocation.
So, explicitly set utf8 before calling qmake.
2024-06-18 21:56:15 +02:00
Enrico Forestieri
fe64db4b70 Add xcb lib if x11extras is detected
In this case we use directly some xcb api outside of the Qt framework
and hence we have to add the xcb library by ourselves.
2024-06-17 21:57:24 +02:00
Jean-Marc Lasgouttes
5d76b4bb8f Support qmake with Qt5 too
This extends the support of qmake to Qt5. Currently, the other
configuration methods are tried if qmake fails, but a message is
printed.

A nice goal would be to get rid of those legacy methods (pkg-config,
plain autoconf-style), if this proves possible.
2024-06-17 17:09:04 +02:00
José Matos
1c458dc121 Python runtime detection requirement upgraded to 3.8
Remove -tt option that is a no-op in Python 3.

Remove search for Python 2
2024-06-10 10:04:26 +01:00
Jean-Marc Lasgouttes
623cc13b60 Autotools: optimize with -Og when debugging
When debug (-g) is enabled (default when compiling a development
version), the existing -O optimization level is not correct, since
many variables are optimized out when debugging.

Use -Og instead, and condition not on compiling a development version,
but on --enable-debug. This is the same by default, but it more
precise in our case.
2024-04-25 12:30:48 +02:00
Enrico Forestieri
76670a6ab9 Fix detection of private Qt6 headers
The gui-private is a separate module. Private Qt6 GUI headers
are currently used only with the Windows backend. However they
are needed to port to Qt6 all functionality that was depending
on the -extras modules. For example, all code guarded by the
macro HAVE_QT5_X11_EXTRAS has to be audited and properly replaced
by Qt6 code. See for example 771f30e9 and 17b24cf4.
2023-08-28 11:03:23 +02:00
Enrico Forestieri
c088cc4413 Fix detection of xcb during configure
The QT_FEATURE_xcb macro is not in the private headers anymore.
They keep changing APIs...
2023-08-28 10:52:08 +02:00
Pavel Sanda
2686efbf7b Copy-paste error in spell.m4.
Reported by Nusret Balci.
2023-08-14 22:26:20 +02:00
Enrico Forestieri
99f972e2c4 Give error if a required Qt6 module is missing
Configure would not stop in such cases and a subsequent make would fail.
2023-07-15 15:28:17 +02:00
Jean-Marc Lasgouttes
c90ea03884 Remove traces of QtCore5Compat in autoconf script
Other instances remain in :
CMakeList.txt
INSTALL.Win32
development/LyX-Mac-binary-release.sh
development/Win32/packaging/installer/src/main.nsh
src/CMakeLists.txt
src/client/CMakeLists.txt
src/support/tests/CMakeLists.txt
src/tests/CMakeLists.txt
src/tex2lyx/CMakeLists.txt
2023-03-03 17:23:13 +01:00
Jean-Marc Lasgouttes
4143dc9202 Autoconf: warn when using stdlib-debug with Qt6 2022-12-05 19:47:00 +01:00
Jean-Marc Lasgouttes
e658113ea6 Add support for libstdc++ assertions in autoconf builds
This is less powerful than stdlib-debug, but at least it does not
change the ABI. This avoids crashes with Qt6 in particular.

The new defaults are:
- stdlib-assertions is enabled by default in development builds;
- stdlib-debug has to be enabled explicitely.

Fixes bug #12215.
2022-12-04 19:28:09 +01:00
Jean-Marc Lasgouttes
9bb61a28f8 remove forgotten traces of Qt4 in configure script 2022-11-21 09:51:12 +01:00
Jean-Marc Lasgouttes
4310430a38 autoconf: remove support for compiling against Qt4
Most of the changes consist in assuming that USE_QT5=yes.

Update INSTALL and README accordingly.
2022-11-19 19:41:49 +01:00
Enrico Forestieri
d7662e5586 Force absolute paths with qmake
When generating makefiles, by default qmake tries to use
relative paths if it can replace at most 4 subdirs with "../"
to reach the QTDIR from the project file location.
This maximum can be changed by defining QMAKE_PROJECT_DEPTH, and
setting it to zero forces qmake to always use absolute paths.

This is necessary because the paths for includes and libs are
generated by a temporary project file located in a temporary dir
not corresponding to the real source dir.
2022-05-29 11:57:58 +02:00
Jean-Marc Lasgouttes
e4416535e4 Fix configure with autoconf 2.71
This fixes two issues with autoconf 2.71

* a new version of eilseq.m4 from libiconv is required ;

* the AC_CHECK_HEADER last `-' argument is obsloleted, but I do not
  think that we needed it in the first place.
2022-04-28 14:36:11 +02:00
Stephan Witt
cb4715d739 Improved Qt framework configuration detection on macOS, add QtCore5Compat headers to configure based includes 2021-12-12 22:24:23 +01:00
Stephan Witt
b48620dff1 Care for consistent compiler flag values of macosx-version-min with ObjC and C++ 2021-12-06 07:51:42 +01:00
Stephan Witt
495cde1aca Qt 5.12.x requires at least MacOS 10.12 2021-12-05 22:42:41 +01:00
Stephan Witt
d1d22a1433 introduce LSMinimumSystemVersion for Mac package with automatic Qt-version based detection plus configure option to choose it manually 2021-12-05 11:10:37 +01:00
Stephan Witt
aabe9e8b11 Improved Qt framework configuration detection on macOS, add support for Qt6 2021-10-24 21:41:11 +02:00
Enrico Forestieri
abad843bd0 Amend 771f30e9 2021-10-17 15:54:28 +02:00
Enrico Forestieri
771f30e946 Enable QWindowsMimeMetafile with Qt6
The QWinMime class has been removed in Qt6 but the functionality
is still present. However, one has to allow inclusion of private
headers and register the mime handling to the QWindowsApplication
native interface.
2021-10-17 15:06:05 +02:00
Enrico Forestieri
4d71d3d8a7 Improve detection of Qt6 libs
We would miss the libraries specified by a full path when
also '-L' flags are present, as we would only take into
account those specified by '-l' flags.
2021-10-16 19:09:30 +02:00
Enrico Forestieri
47f1fec96c Fix build with Qt6
In Qt6 the Svg includes are split into two different subdirs,
namely QtSvg and QtSvgWidgets. So, after 0862042b, it is necessary
to also account for the last one. Nothing needs to be done for Qt5.
2021-10-12 20:23:27 +02:00
Jean-Marc Lasgouttes
37c34c5ca9 Fixup c52049bb83: -Werror is needed to test for warning flags
At least on my old clang++, this is required.

Fixes bug #12391.
2021-10-11 14:31:58 +02:00
Jean-Marc Lasgouttes
c52049bb83 Autoconf build: Fix the invalid test for '-Wno-deprecated-copy' flag
(shamelessly stolen from c26db650a1, which was for cmake build)

The original test was always successfull, even if the flag was invalid.

But checking for '-Wdeprecated-copy' instead yields to error if the
warning does not exist. Existent warning for 'deprecated-copy' implies
that 'no-deprecated-copy' also exist.
2021-09-29 18:16:06 +02:00
Stephan Witt
c93c94fd22 Correct moc compiler version extractor regex for patch level greater 9. 2021-07-16 18:12:33 +02:00
Enrico Forestieri
f60b23cbc1 Fix configure with Qt 6.1
Since Qt 6.1 the moc, rcc, and uic compilers are not installed
in the bin dir anymore. We ask qmake for their location and
record them with full path so that it is not necessary thinkering
with the PATH variable.
2021-06-15 11:40:27 +02:00
Enrico Forestieri
779f0a74f0 Tweak Qt6 detection
Don't try in turn every possible qmake candidate but directly
use the correct one.
2021-03-27 11:23:52 +01:00
Enrico Forestieri
4b20ae9d59 Improve Qt6 detection
There is still no clear pattern of how distributions will install Qt6.
The old scheme of adding a -qtN suffix is not followed by OpenSuse,
and qmake and the ancillary programs are installed with 6 as a suffix.
2021-03-21 11:28:11 +01:00
Pavel Sanda
833863c477 Allow bundled saxon not to be installed. 2021-03-17 21:51:01 +01:00
Pavel Sanda
901356fd58 Allow bundled saxon not to be installed. 2021-03-16 23:14:19 +01:00
Enrico Forestieri
635a7d77dd Allow compiling with Qt6
This commit allows compiling LyX with Qt6 when using autotools.
For a successful compilation the following 2 conditions must be met.

1) The Qt6 qmake has to come first in PATH, so that the command
   "qmake -v | grep -o 'Qt version .'" returns "Qt version 6".
2) The --enable-qt6 switch has to be passed to the configure command.

If --enable-qt6 is used but Qt6 is not found, Qt5 is tried as a fallback.
If also Qt5 is not found, configuring for Qt4 is attempted.
If --enable-qt6 is not used, then things go as usual. This means that Qt5
is tried first and then Qt4, unless --disable-qt5 is used, in which case
Qt4 is directly attempted. This means that existing scripts should
continue working unmodified.

LyX should compile with Qt6 on windows and linux, and possibly also on
mac, but I could not test that. However, it is not guaranteed that it
works as it should. In particular I am not sure that I got right the
conversion from QRegExp to QRegularExpression. For sure, the syntax
highlighting seems to not work right. Someone in the know should take
a look at that. I am able to load documents and compile them but some
thourough testing is needed. However, when compiling for Qt5 or Qt4,
I tried to make sure that the functionality is preserved.
2021-03-15 17:09:09 +01:00
Jean-Marc Lasgouttes
69eb262721 Fixup 22f599250e: missing wildcard
Now all the old gcc 4.x versions (x < 9) are correctly tagged as
obsolete.
2021-01-04 18:00:16 +01:00
Jean-Marc Lasgouttes
8d0d3ea090 Autoconf: use included boost when system boost is not available 2020-12-20 19:27:01 +01:00
Yuriy Skalko
bda4570400 Use new signal library nod instead of boost::signals2
Thanks Enrico for updating autotools files.
2020-12-13 23:11:19 +02:00
Jean-Marc Lasgouttes
bf28a2677c Autotools: use C++17 mode when available 2020-12-10 12:35:00 +01:00
Jean-Marc Lasgouttes
ca938c08d9 autotools: use system boost by default
What is missing is a test to use bundled boost automatically when
system boost is missing. I am not sure this is required, though.
2020-11-29 22:07:26 +01:00
Jean-Marc Lasgouttes
3093789e8d remove most traces of boost::regex
1/ remove boost regex code from 3rdparty/boost. Only the cmake stuff remains.

2/ remove traces of BOOST_LIB since there is no need anymore to
   compile boost stuff.

3/ remove traces of boost regexp in config/lyxinclude.m4 and INSTALL

4/ require gcc 4.9 as minimal version in autoconf.

Unfortunately, the net gain is only 10% of included boost size (now 21M).
2020-11-28 19:59:17 +01:00
Yuriy Skalko
f3ec89cfa1 Always use std::regex
Since now minimum supported GCC is 4.9.
2020-11-27 12:39:59 +02:00
Jean-Marc Lasgouttes
ff1ab048f1 Revert "Limit the -Wall flag to C++ compiler"
Something is fishy, it breaks compilation.

This reverts commit cbc9a901af.
2020-11-20 14:39:35 +01:00
Jean-Marc Lasgouttes
cbc9a901af Limit the -Wall flag to C++ compiler
This avoids tons of warning when compiling code, like libiconv, which is
not prepared to this kind of scrutiny of its code quality...
2020-11-20 13:45:30 +01:00
Jean-Marc Lasgouttes
b5d1f2f300 Fix compilation of included libiconv with autoconf 2020-11-19 13:44:01 +01:00
Jean-Marc Lasgouttes
031720b66a Do nothing if hunspell support is disabled 2020-11-19 13:44:01 +01:00