Commit Graph

535 Commits

Author SHA1 Message Date
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
Enrico Forestieri
6253cc4c51 Account for Qt 5.10
Fix regular sed expression in order to catch a second digit in the
Qt minor version number.
2018-01-05 19:29:12 +01:00
Jean-Marc Lasgouttes
e8d8f0abf8 Revert "autoconf"
I did not plan to push this

This reverts commit 0bd6cc30bc.
2017-10-11 12:02:25 +02:00
Jean-Marc Lasgouttes
0bd6cc30bc autoconf 2017-10-11 11:20:59 +02:00
Juergen Spitzmueller
a8204c4630 Indentation fixes. 2017-09-18 18:38:09 +02:00
Juergen Spitzmueller
3b89cd9c28 Update internal Hunspell to latest release (1.6.2) 2017-09-18 18:12:21 +02:00
Juergen Spitzmueller
561d36a19e Do not disable the other spellers when compiling against internal hunspell
Users might still want to have a selection.
2017-09-18 18:06:01 +02:00
Juergen Spitzmueller
be36fe6e62 Define USE_HUNSPELL when compiling against included hunspell.
Otherwise, the speller is disabled.
2017-09-18 17:31:42 +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
b541692823 Fix configuring for Qt 5.8
They moved the QT_QPA_DEFAULT_PLATFORM_NAME definition to the newly
introduced qtgui-config.h header.
This fix is also necessary for cmake, but I don't know how to do it.
It would be simply a matter of using QtGui/qtgui-config.h instead
of QtCore/qconfig.h, if QtGui/qtgui-config.h exists.
2017-02-07 11:29:30 +01:00
Enrico Forestieri
41e409f8f7 Use std::call_once only if it is actually available 2016-08-07 04:58:41 +02:00
Jean-Marc Lasgouttes
c58967a5ff autoconf: Check for C++11 and std::regex soon in LYX_PROG_CXX
This makes the test for std::regex a bit faster.
2016-07-18 11:53:30 +02:00
Enrico Forestieri
5adc2c5ff2 Use a more portable construct
Some shells do not understand the $() notation for command substitution.
2016-07-17 23:50:34 +02:00
Enrico Forestieri
0c7bd9a57f Check path of Qt tools if qtchooser is detected
The full path of the tools is retained only if the Qt directory is
specified using --with-qt-dir. Now, when qtchooser was detected it
was blindly assumed that the corresponding system tools were being
used. These tools discriminate between Qt4 and Qt5 through the
option -qt=qt4 or -qt=qt5. However, the original Qt tools don't
understand these options, so that if they come first in the PATH,
configuration fails. So, only use those options if we are reasonably
sure that the system Qt is wanted. This is achieved by comparing the
paths of qtchooser and tools as, typically, they are located in the
same directory. In this way, if one prepends the bin directory of a
custom Qt build to PATH (and accordingly adjusts PKG_CONFIG_PATH),
configuration succeeds even if --with-qt-dir is not specified.
2016-07-17 12:31:24 +02:00
Enrico Forestieri
cb0c881b02 Fix paste of selection to (unfocused) external applications
With both Qt4 and Qt5, when using a click-to-focus policy, the first
attempt to paste a selection by middle mouse in an external application
which has no focus may fail. It is not clear why this succeeds for some
applications and fails for others, but refreshing the timestamp of the
selection request cures the issue. The cmake part is by Kornel.

See also this thread:
http://thread.gmane.org/gmane.editors.lyx.devel/162491
2016-07-10 19:31:32 +02:00
Enrico Forestieri
f0aa129938 Account for the case in which Qt tools are not in PATH
If the Qt directory is specified by --with-qt-dir, the full path
of the tools is retained. Otherwise, if qtchooser is detected,
the generic names are attempted with proper arguments to select
the desired Qt version. Otherwise, the generic names with and without
proper suffixes (either -qt5 or -qt4) are checked in the PATH.

This means that --with-qt-dir=qtdir should be used only if the tools
are not in the PATH, or qtdir/bin/{moc,rcc,uic} are the right versions
for the desired Qt. In any case, it is later checked that the selected
tools are the right ones and a warning is issued if there is a mismatch.
2016-07-07 23:12:07 +02:00
Jean-Marc Lasgouttes
14a6a4723f Use a proper test for detecting usable std::regex
The test is stolen from cmake code.

Tested on:

* ubuntu 12.04 with g++ 4.6, clang 3.3 (with libstdc++)

* ubuntu 16.04 with g++ 5.3, clang 3.7 (with libstdc++) and clang 3.7
  (with libc++)

The last combination fails, but it seems to be related to real bugs
(reported for debian), so this is OK.
2016-07-06 15:12:53 +02:00
Jean-Marc Lasgouttes
23dbcb59d2 New test to determine correct -std option for CXX compiler
The test file is stolen from cmake. The options tested are, from the
most desirable to the least desirable:
  -std=c++14 -std=c++11 "" -std=c++0x -std=gnu++14 -std=gnu++11 -std=gnu++0x

It is expected that the result will not be correct for cygwin, but
this is fixable.
2016-07-06 14:21:49 +02:00
Jean-Marc Lasgouttes
d044986724 Autoconf : Try to select the correct Qt tools by using the -qt option
With this change, it is now possible to configure with --enable-qt5
and have make use "moc -qt=qt5" automatically.

This is done when the command qtchooser is available nd the desired Qt
version (qt4/qt5) is available.

This means that it is now possible to have qt4 and qt5 builds easily
on a same linux system.
2016-07-05 12:01:13 +02:00
Jean-Marc Lasgouttes
67ac031a33 Gcc 6+ use C++14 as default, so there is no need to enforce C++11
Also, use gnu++11 unconditionnally with gcc as we used to do before 67385e69.
2016-07-04 12:15:01 +02:00
Enrico Forestieri
6863fe9606 Fix build with autotools and gcc 6 2016-06-26 19:45:50 +02:00