Commit Graph

561 Commits

Author SHA1 Message Date
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
Jean-Marc Lasgouttes
22f599250e Remove support for gcc 4.6
This was kept so long because of Ubuntu 12.04 LTS, but having a
not-really-c++11 compiler is not nice.
2019-06-12 15:03:18 +02:00
Jean-Marc Lasgouttes
d933d72fa9 Search for python3 first, then python2 in autoconf
Python 3.x shall have priority over python 2.x. In 2.5.0dev, support
for python2 will be removed.

Now, we ignore all pythonx.y names, which are not relevant, and do not try
either the basic "python" name.
2019-05-16 18:36:41 +02:00
Jean-Marc Lasgouttes
4028eefe61 Make callstack printing useful and optional
When callback printing is enabled, link lyx with -rdynamic, so that
stacks have LyX symbols available.

Add option --disable-callstack-printing to configure.

Running "size" on binary:
 * with callstack printing support
   text	   data	    bss	    dec	    hex	filename
20891684	  34680	 107796	21034160	140f4b0	src/lyx

 * without callstack printing support
    text	   data	    bss	    dec	    hex	filename
17953640	  34648	 107796	18096084	1141fd4	src/lyx
2019-02-25 17:58:06 +01:00
Jean-Marc Lasgouttes
e78a5bd1a8 Fix help message for --disable-qt5 2019-02-25 16:24:30 +01:00
Enrico Forestieri
0cab640035 Try with Qt4 when configuring for Qt5 fails
This allows to avoid using --disable-qt5 when only the Qt4 libraries
are available.
2018-08-27 16:31:51 +02:00
Enrico Forestieri
a7ea98a30a Make Qt5 the default for building
Until now, building with Qt5 required using --enable-qt5.
This is no more necessary. To build with Qt4 one should now
use --disable-qt5 or, equivalently, --enable-qt5=no.
2018-08-26 15:02:59 +02:00
Jean-Marc Lasgouttes
d7020ea919 Warn when using system hunspell in stdlib-debug mode
This is what we already do with boost. Note that the warning only
triggers with the new C++ ABI.
2018-04-09 15:50:50 +02:00
Juergen Spitzmueller
1efef5542b Adapt to new hunspell C++ ABI
Fixes: #10547

CMake support still missing.
2018-03-29 18:43:11 +02:00
Jean-Marc Lasgouttes
d9e0a842cf Compile 3rdparty/hunspell in stdlib-debug mode when needed
A function that returns a vector<string> will lead to a crash if the
main code and the library have not been compiled with the same
stdlib-debug state. See for example:
https://stackoverflow.com/questions/4764048/stl-and-release-debug-library-mess

This is fixed by introducing a new variable STDLIB_DEBUG that contains
the flags that trigger the debug mode (autoconf only for now).

This will allow to go forward with bug #10547.
2018-03-29 12:08:48 +02:00
Juergen Spitzmueller
1ae537c543 Change lookup order for enchant-2 vs. enchant (prefer the former) 2018-03-19 09:56:53 +01:00
Juergen Spitzmueller
71977769ec check for enchant-2
Fixes rest of #10986
2018-03-19 09:03:35 +01:00
Jean-Marc Lasgouttes
63a4e82874 Add support for enchant 2.x
As of enchant 2.x, it is required to create a Broker instance instead
of relying on a static one provided by the library.

Add autoconf and cmake (courtesy of Kornel) tests that check whether
one can indeed instantiate a Broker object, and act on the result in a
new broker() helper function.

Fixes bug #10986.
2018-01-30 12:11:22 +01:00