Commit Graph

573 Commits

Author SHA1 Message Date
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
Kornel Benko
042128b643 Automake build: We are using 3rdparty iconv with version 1.15 2020-11-17 23:07:01 +01:00
Jean-Marc Lasgouttes
acce7a9ce8 Fixup ce526607 again: last-minute blunder 2020-11-03 16:22:20 +01:00
Jean-Marc Lasgouttes
c872cbb8cc Fixup 6394dd89: small cleanups 2020-11-03 15:12:20 +01:00
Jean-Marc Lasgouttes
ce526607ff Make it possible to select C++ standard with autoconf
Introduce new configure option --enable-cxx-mode=MODE, which allows to
force a C++ version. The default is {14,11}, which means that C++14 is
chosen if it is supported, and C++11 will be selected as a fallback.

Using --enable-cxx-mode=11 ensures that LyX compiles correctly
with an older C++11 compiler.
2020-11-03 15:12:20 +01:00
Jean-Marc Lasgouttes
f6921d9161 Do not honor stdlib-debug when c++library is not gcc's libstdc++
Actually the real difference is that it does not complain about system
boost any more when LLVM's libc++ is used.
2020-10-25 12:45:04 +01:00
Jean-Marc Lasgouttes
4aee447af1 Use -Wno-deprecated-copy only when supported by compiler
This is better than depending on compiler version. In particular,
Apple clang versions do not match regular clang versions.

Note that -Wno-deprecated-copy will always be used with g++, since
this compiler allows to suppress warnings it does not know about
(-Wno-zorg is valid, even though -Wzorg triggers an error).
2020-10-13 18:27:25 +02:00
Jean-Marc Lasgouttes
24fb0ff8ef Use -Wno-deprecated-copy also with clang++ 11 2020-10-05 18:18:15 +02:00
Jean-Marc Lasgouttes
db5021c42e Avoid warnings about deprecated copy in gcc 10 too 2020-04-30 12:09:17 +02:00
Jean-Marc Lasgouttes
e9e8069b17 Disable deprecated-copy warning with clang10
This was already done for gcc9 and saves tons of warnings.

Note that the warning in Qt are gone with Qt5.13, so eventually we
will have to get rid of our own copy issues.
2020-04-28 13:16:45 +02:00
Jean-Marc Lasgouttes
2aff8937ec Add automake support for dtl 2020-04-09 12:40:00 +02:00
Jean-Marc Lasgouttes
c3bf053dd3 Do not put C++-only options in AM_CPPFLAGS 2020-04-09 12:24:44 +02:00
Juergen Spitzmueller
76eb01718d Re-add file that got lost in the qt4 > qt rename 2019-07-21 12:36:05 +02:00
Jean-Marc Lasgouttes
c293be56bd Rename frontend qt4 to qt
In particular, the directory frontends/qt4 is renamed to frontends/qt.

Many configurations file have to be updated. All mentions of qt4 in
the source have been audited, and changed to qt if necessary.

The only part that has not been updated is the CMake build system.
2019-07-20 23:39:40 +02:00
Jean-Marc Lasgouttes
f0810d8092 Search also for Python named `python'
This is needed for macOS, apparently.
2019-06-25 12:04:26 +02:00
Jean-Marc Lasgouttes
44bbd0b0ef Get full version of gcc
Recent gcc versions return a short version with -dumpversion, e.g. 9.

In this case, use -dumpfullversion, which gives something like 9.1.0.

This makes the gcc 9 detection work properly.
2019-06-12 20:35:11 +02:00
Jean-Marc Lasgouttes
134f3aedaf Avoid warnings with gcc 9
The warning about unneeded std::move can be solved by conditioning on
C++14 mode.

The warnings about deprecated copy is harder, so we disable it for
now. We will be able to fix our part, but Qt triggers it a lot too.
2019-06-12 18:49:29 +02:00
Jean-Marc Lasgouttes
03eadb1a66 Use autoupdate to convert some obsolete calls
AC_TRY_COMPILE and AC_TRY_LINK have been obsolete for some time.

Now most autoconf warnings are gone.
2019-06-12 18:10:13 +02:00
Jean-Marc Lasgouttes
5173f22024 Fix some warnings found by the -Wall options of autoconf and automake.
There are still warnings to address. For now, they not enabled by default.
2019-06-12 18:00:18 +02:00
Jean-Marc Lasgouttes
c3484fa6c8 Update the in-source hunspell to version 1.7.0 2019-06-12 16:38:42 +02:00