Commit Graph

288 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Jean-Marc Lasgouttes
9fe8190364 Make "devel mode" configurable at run time
Traditionally LyX behaves differently when the directive DEVEL_VERSION
is defined at compile time. This covers
* more detailed description of current position in status bar
* the help files are open in read/write mode
* more detailed debug output in the View Source panel

This patch introduces the new function devel-mode-toggle that allows
to use devel mode in stable releases, and vice versa.

The information is saved in the session file. The default is to
disable devel mode.

Remove all traces of DEVEL_VERSION in autoconf and cmake
2017-07-24 22:00:44 +02:00
Jean-Marc Lasgouttes
fb8148b8c4 Remove unused autoconf macro 2017-04-25 12:16:23 +02:00
Jean-Marc Lasgouttes
cd48fb8ae7 Configure options cleanup
The default build type (computed from LyX version) is now displayed in
configure help.

Change a little bit the help text of several options.
2017-04-24 11:33:15 +02:00
Jean-Marc Lasgouttes
0e50ad8b16 Update bundled mythes to version 1.2.5
Move it to 3rdparty/ directory alongside the other ones.
2017-03-06 17:08:38 +01:00
Jean-Marc Lasgouttes
8cb021b32f Rewrite detection of MyThes library
Now configure searches in this order
1. system-installed library
2. code bundled with LyX

If --with-included-mythes or if no mythes library is installed, then
the script selects the bundled version. There should be no cases
leading to error message.
2017-03-06 16:10:11 +01:00
Jean-Marc Lasgouttes
aa6619237d Fixup to 2f701e6a1
Use the bundled mythes by default again, since the current situaiton
create an error for anybody who does not have the system one
installed.

This is a stop gap measure and I'll return to it later (in a hurry now).
2017-03-03 12:01:54 +01:00
Jean-Marc Lasgouttes
2f701e6a1c Clarify configure help for 3rd party code
The configure code suggests that the default for
--with-included-(iconv|zlib|hunspell) is "yes", which is wrong: by
default is indeed to use the system libraries.

Change the MyThes detection to use the system version by default.

Also add to the verison information a line which lists the bundled libraries.
2017-03-02 14:35:39 +01:00
Enrico Forestieri
41e409f8f7 Use std::call_once only if it is actually available 2016-08-07 04:58:41 +02:00