Commit Graph

59 Commits

Author SHA1 Message Date
Kornel Benko
ebe4834684 Disable use of QPA_XCB if using QT6 2022-09-17 14:14:41 +02:00
Kornel Benko
02a3705496 Amend 635a7d77: Allow compiling with Qt6 with cmake
Thanks Scott for checking.
TODO: Check compilation on Windows and Mac.
2021-03-22 16:19:10 +01:00
Kornel Benko
53084dbfd8 CMake: in Hunspell ABI check only link if external
(Thanks Scott for the patch and comment)

For the HAVE_HUNSPELL_CXXABI check, only test a (real) link command
if an external libhunspell is used or if macOS is used (see
350a9daf). If the bundled libhunspell is used, it has not been built
yet at the point of the initial cmake command.

This commit fixes an issue when the bundled Hunspell is desired.
Before, the test command would still attempt to link to the system
hunspell library. Even if the system library is available, there
could be problems if there is a mismatch of the CXX ABI. And
finally, even if the system library is available and there is no
mismatch, compiling the test file with Clang and -stdlib=libc++
seems to cause a failure when linking with the system Hunspell
library.
2021-01-20 09:39:03 +01:00
Kornel Benko
40e071c7cb Cmake build: Improve checks for stdlib-debug 2020-07-11 12:43:17 +02:00
Kornel Benko
350a9daf56 Cmake build: Add LINK_LIBRARIES to check for HUNSPELL CXX ABI. Needed by XCode
The trick with faking the link command does not work with XCode
see: https://cmake.org/pipermail/cmake/2010-May/037132.html

Spotted by Patrick (pdvisschere@edpnet.be)
2019-11-29 13:49:02 +01:00
Kornel Benko
9de4b9ab34 Cmake build: Remove unneeded hunspell path from configure test
Spotted by Patrick (pdvisschere@edpnet.be)
2019-11-28 14:31:26 +01:00
Kornel Benko
cbcf57ec13 Amend f4254e69: Use correct sequence in set-command 2019-06-24 12:56:51 +02:00
Kornel Benko
f4254e6999 Cmake windows build: Fix a cache variable
Thanks to Jürgen Womser-Schütz
2019-06-24 10:36:37 +02:00
Kornel Benko
4da338e550 CMake build: Rename HAVE_LONG_LONG to HAVE_LONG_LONG_INT 2019-03-21 16:12:02 +01:00
Kornel Benko
016c7d6260 Amend 4028eefe: Make callstack printing useful and optional
Added the option to cmake too
2019-02-26 09:50:58 +01:00
Kornel Benko
bda9e38ade Amend d7020ea: Add the warn when using system hunspell in stdlib-debug mode also for cmake 2018-04-09 17:13:52 +02:00
Kornel Benko
b7c8033548 Cmake build: Check for correct hunspell only if used 2018-03-30 19:40:08 +02:00
Kornel Benko
4cfc5bb75d Amend 8774ad5, Adapt to new hunspell C++ ABI for cmake
Replace CHECK_CXX_SOURCE_COMPILES() with TRY_COMPILE()
Discarding the link-stage mimics the behaviour used by automake.
Now the testsource is compiled regardless if hunspell
is external or not.
2018-03-30 14:10:45 +02:00
Kornel Benko
8774ad51c0 Adapt to new hunspell C++ ABI for cmake
The compile test for 3rdparty hunspell is omitted,
because the macro check_cxx_source_compiles() tries also to link.
But at the time of the check, the required library is not there.
2018-03-29 22:53:59 +02:00
Kornel Benko
454f56b5f2 Cmake build: Allow cross-compiling with mingw again
1.) The check for "QT_USES_X11" expects the created application
  to run, but the '.exe' file does not run on linux.
2.) Don't use megered build anymore, it is not faster
  on multi-processor machines anyway
2018-02-10 11:21:08 +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
Kornel Benko
c6314fc7d0 Amend b5416928. Cmake configuration for QT5.8 2017-02-23 00:18:52 +01:00
Kornel Benko
2d49342ce3 Cmake build: Amend 41e409f8: Use std::call_once only if it is actually available 2016-08-07 11:32:53 +02:00
Kornel Benko
59ac7ce660 Cmake build: Add needed libraries if using QT5_Extras
Commit cb0c881 does this already for automake.
2016-07-11 19:08:11 +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
Kornel Benko
2da1c956e4 Cmake build: Check for make_unique and PATH_MAX symbols added. 2016-06-12 19:56:31 +02:00
Kornel Benko
7a86fe3e0b Cmake: Allow test for X11 with QT5.6
Used for key-test tests.
2016-05-30 08:22:15 +02:00
Georg Baum
d5f2bad461 Mingw-w64 build fixes for long long
On mingw-w64, long long (64bit wide) is larger than long (32bit wide).
Therefore we need some more specializations for string, docstring,
otextstream and << overloaded ostream functions. The configuration code
is by me, the source code changes by Shankar Giri Venkita Giri (bug 10053).
2016-05-29 17:55:43 -04:00
Peter Kümmel
11f9c71d75 fix MinGW build on Windows 2015-12-15 13:20:11 +01:00
Georg Baum
a15aafa2a1 Use std::regex automatically in C++11 mode
This is consistent with autotools. The only exception is MSVC, since we do not
know yet whether it works.
2015-12-06 20:04:21 +01:00
Georg Baum
51cc8aa9f6 Fix build with GNU libstdc++ C++11 ABI
The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as
older versions, or with a new ABI which is conformant to the C++11 standard.
LyX did not build if the latter was used:
https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log

This is now fixed by detecting the ABI version and disabling the wrong forward
declarations. At the same time, STD_STRING_USES_COW is switched off for the
C++11 ABI version, because the std::basic_string implementation is now C++11
conformant. Since the GNU libstdc++ can also used by other compilers such as
clang, we must not test for the compiler version.
2015-05-08 21:12:42 +02:00
Enrico Forestieri
9126a99e97 Fix bug #9217: [Qt5] QWindowsMime class not available
The support for QWindowsMime has been reintroduced in Qt 5.4.0.
The class name has been changed to QWinMime but the interface
is exactly the same.
2014-12-26 16:53:31 +01:00
Georg Baum
7796ad3a36 Improve llvm libc++ detection
The old detection did only work if CFLAGS contained -std=c++11, since ciso646
was only included for __cplusplus > 199711.
Thanks to Koernel for the cmake part.
2014-12-21 17:26:21 +01:00
Kornel Benko
98d063e9be Cmake build: Check for string COW by checking for library, not compiler
Changed according to automake behaviour, see 385f3e8abd
2014-12-19 12:32:14 +01:00
Kornel Benko
edf22ba723 Cmake build: Detect clang and adapt definition of STD_STRING_USES_COW. 2014-12-08 17:43:05 +01:00
Kornel Benko
07683c1f0d Cmake build: 'callstack printing' detection.
Instead of depending on compiler we try to check for working
API as is done now for automake build too.
2014-11-09 12:59:14 +01:00
Kornel Benko
207cd7a1b7 Cmake build: Use LYX_USE_QT to determine if QT uses X11 2014-06-12 07:52:45 +02:00
Kornel Benko
e1d3189492 Cmake build: Select full path to library
Testing for QT_USES_X11 links ok now also if the the qt-libraries
are on some non-conform place. (Like self compiled but not installed).
2014-06-07 10:55:21 +02:00
Kornel Benko
046001e571 Make: improve detection of X11 with Qt 5
In collaboration with Scott Kostyshak:
With Qt 4 we could use Q_WS_X11, defined by FindQt4.cmake. In Qt 5,
there is no FindQt5.cmake. Instead we now define our own variable,
QT_USES_X11 by using class QX11Info available only on X11.
(http://qt-project.org/doc/qt-5/QX11Info.html)

The main consequence of this improved support is that now the keytests
can be run (ctest -R "keytest") when LyX is compiled with Qt 5.
Before, with Qt 5 we did not know if X11 was available, which is
needed by xvkbd, so the tests were not enabled. Note, however, that
many tests fail with Qt version 5.2.1 because there was a change in
the event handling mechanism in Qt that causes xvkbd to be unable to
pass capital letters (so case sensitive greps in the tests fail). This
needs to be investigated and reported.
2014-05-25 13:50:18 +02:00
Kornel Benko
805e51eff8 Implement file locking and apply to configure
Functions for file locking are added. They are used for ensuring that
for specified userdir only one LyX process runs configure.
2013-11-20 19:40:32 +01:00
Kornel Benko
0ea6654228 Cmake build: Creating a define for a header file found
need now only changes in the list of header files in ConfigureChecks.cmake.
2013-02-12 19:01:16 +01:00
Kornel Benko
5970aff01a Cmake build: If checking for new function, say xyzzy, we want
have a definition '#define HAVE_XYZZY 1'.
Now, it is sufficient to add xyzzy to list of functions in ConfigureChecks.cmake'
2013-02-12 17:22:07 +01:00
Kornel Benko
36c5c7b9c5 Cmake build: 1.) Sort function checcking alphabetically
2.) add definition HAVE_UNSETENV to header
2013-02-12 15:27:39 +01:00
Jean-Marc Lasgouttes
81d863fd41 Fix bug #8537: LyX creates the environment variable LC_ALL
The current code is not able to unset an environment variable, only to set it to an empty value. This patch refactors a bit the Message class and uses a new EnvChanger helper class that allows to change temporarily an environment variable and that is able to unset variables if needed.

The patch also adds new functions hasEnv and unsetEnv in environment.cpp.

Open issues:
 * there may be systems where unsetenv is not available and putenv("name=") does not do the right thing;
 * unsetenv may lead to leaks on some platforms.
 * when using unsetenv, we may need to remove strings from the internal map that setEnv uses.
2013-02-12 12:14:06 +01:00
Stephan Witt
f494131d06 add missing check for setenv: environment.cpp and POSIX standards prefer setenv
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35194 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-25 05:57:06 +00:00
Kornel Benko
8e02385cea Applied revision 31646 to cmake-build too
Do not check for headers strings.h, io.h, process.h

Do not check for functions mkstemp, mktemp

Do not check for declarations of istreambug_iterator, iterator, mktemp



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31647 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-16 10:51:58 +00:00
Kornel Benko
14a2d495a5 Check for fcntl is maybe more more portable, than searching in
header files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29931 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-04 15:01:31 +00:00
Kornel Benko
a9ed2f18f4 Enable sockets on linux too. "fcntl" defined at /usr/include/fcntl.h.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29895 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-31 11:53:52 +00:00
Peter Kümmel
b581607b55 cmake: gettext patch from Kornel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27931 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-20 09:25:55 +00:00
Peter Kümmel
f712b9840f cmake: add endian check, thx to Jose and pdv
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26469 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-20 19:43:52 +00:00
Peter Kümmel
07502281bc MinGW fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24381 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-20 11:06:08 +00:00
Peter Kümmel
5c90a54ac1 cmake: enable lyxserver on linux
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22382 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 13:12:37 +00:00
Abdelrazak Younes
34f0cc2ae1 Enable HAVE_DECL_ISTREAMBUF_ITERATOR checking as istreambuf_iterator exists and work correctly with MSVC2005
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21844 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 09:53:45 +00:00
André Pönitz
214f1de1b8 do not check for Standard C++ features anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19762 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 21:18:53 +00:00
André Pönitz
1452e0d285 revert accidental change in last commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19400 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 15:09:34 +00:00