Commit Graph

591 Commits

Author SHA1 Message Date
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
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
Georg Baum
e307944d18 Require gcc 4.6
See also 5de30b1210
2016-06-15 22:04:51 +02:00
Jean-Marc Lasgouttes
e8655e9a70 Detect clang version in autoconf (and use it a bit)
The version is read by checking the macros __clang_major__,
__clang_minor__ and __clang_patchlevel__. Hopefully they will have
coherent values everywhere.

For now, the version is used to set warnings a bit more reasonably for
older clang versions, which do not support -Wdeprecated-register and
some others that are used in pragmas in boost.

This removes many warnings when compiling with clang 3.3.
2016-06-13 11:25:23 +02:00
Georg Baum
20a00903b1 Fix linking with std::regex and included boost 2016-06-11 10:10:20 +02:00
Georg Baum
cf1e08f7f7 Skip boost linking test if not needed
We only link against boost libraries if we do not use std::regex.
Therefore, we do not need to test how to link against boost libs unconditionally.
Also, the warning regarding stdlib-debug is only needed if we link against boost.
2016-06-11 09:20:16 +02:00
Georg Baum
7293fc7b66 Get rid of boost signals in multithreading test
Test for regex instead since this is the only boost library we are linking against.
2016-06-11 09:04:50 +02:00
Jean-Marc Lasgouttes
6f585055d9 Allow to disable std::regex manually with autoconf
Update INSTALL and remove mention of --disable-cxx11.
2016-06-10 12:01:53 +02:00
Georg Baum
2047ea5eb4 Replace Boost.Signals with Boost.Signals2
Boost.Signals is deprecated. This fixes bug #9943.
The only thing left to do is to rewrite (or get rid of) the boost -mt test
in config/lyxinclude.m4 not to use signals anymore.
2016-06-09 22:25:34 +02:00
Guillaume Munch
a73f2e6eb6 Autotools: restore deprecation warning
-Wno-deprecated-declarations was added at 314a121c.
2016-06-09 15:21:39 +01:00
Georg Baum
273c67d8aa Require a C++11 compiler
As discussed on the list. If no C++11 compiler is found configuration stops
with an error. There are now unneeded parts of boost, the will be removed in
a second commit.
2016-06-07 20:34:52 +02:00
Georg Baum
ad63374e26 Require at least gcc 4.3
This is a prerequisite for mandatory C++11 support.
I could not find a cmake gcc version check btw.
2016-06-05 15:40:00 +02:00
Georg Baum
c8619110ff Fix packaging for mingw crosscompilation
The standard host triplet for mingw tools is is something like
x86_64-w64-mingw32 on debian and something like x86-64-w64-mingw32.shared for
mxe (http://mxe.cc). Detect windows packaging correctly for these build types.
2016-05-29 17:55:44 -04:00
Georg Baum
f434fd22b1 Configure included hunspell with autotools
The included hunspell should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included hunspell or not.
cmake does already support that.

Now the only other dependency you need to cross-compile for mingw on debian
or ubuntu is qt.
2016-05-29 17:55:44 -04:00
Georg Baum
08afc52c4c Configure included iconv with autotools
The included iconv should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included iconv or not.
cmake does already support that.

eilseq.m4 was taken from the original libiconv 1.14 package.
2016-05-29 17:55:43 -04:00
Georg Baum
041bcbed74 Fix include path for zconf.h
I forgot that in the previous commit, and compilation seemed to work because
I had another zconf.h lying around.
2016-05-29 17:55:43 -04:00
Georg Baum
ee13c5b7e2 Fix packaging for mingw-64
See bug 10053 for details. Without this, the package is only set correctly
for 32bit mingw.
Thanks Enrico for suggesting this fix and Shankar Giri Venkita Giri for
testing it.
2016-05-29 17:55:43 -04:00
Georg Baum
6343a017f7 Do not search for X in mingw builds
The manual qt configuration did not work previously for mingw builds, since it
serached for X libraries, which are not used by LyX on mingw.
2016-05-29 17:55:43 -04:00
Georg Baum
78e17b1579 Configure included zlib with autotools
The included zlib should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included zlib or not.
cmake does already support that.

zconf.h.in was taken from the original zlib 1.2.8 package. The generation of
zconf.h was made equivalent to the one generated by cmake.
2016-05-29 17:55:43 -04:00
Jean-Marc Lasgouttes
3c2d3caf27 Do not add -std=c++11 to CPPFLAGS (because objc does not like it)
Since at least gcc 4.6 requires it, -std=c++11 has been passed to CPPFLAGS at 39717adfd. This was deemed necessary so that tests that use the preprocessor directly (AC_CHECK_HEADER) can have the right information.

It turns out that CPPFLAGS gets passed to objc compilation too (on Mac OS X) and this create compile-time errors.

Therefore we remove the -std flag from CPPFLAGS and re-add it to a separate variable cxx11_flags that is passed to LYX_CXX_USE_REGEX.
2016-02-23 15:01:16 +01:00
Jean-Marc Lasgouttes
39717adfda Fix the logic of selection of std::regex
This amends commit e1938aa2, which introduced some logic
errors: regex would be enabled for gcc versions which have unusable
<regex> header.

The new code separates better special gcc handling from special C++11
handling and should be more readable.

* set -std=c++11 in AM_CPPFLAGS instead of AM_CXXFLAGS, since the
  preprocessor uses this setting too.

* Before checking for header <regex>, set language to C++ and update
  value of AM_CPPFLAGS too.

* Separate code that checks for regex in its own macro.

* now unknown compiler which have the <regex> header, will use std::regex in C++11 mode.
2016-01-11 10:40:12 +01:00
Peter Kümmel
a8d78905b6 3rdparty/boost: build with autotools 2015-12-20 13:06:59 +01:00
Jean-Marc Lasgouttes
314a121c9e Autotools: use -Wno-deprecated-declarations also with --disable-warnings
-Wno-deprecated-declarations is needed to avoid warnings about auto_ptr being obsolete.

The old code meant that the warnings would be suppressed for development builds, but active for release builds. The new code avoids that.
2015-12-11 10:31:46 +01:00
Jean-Marc Lasgouttes
26b3674240 Fix syntax error whe testing old compilers 2015-12-07 22:51:36 +01:00
Jean-Marc Lasgouttes
a0b9b9b678 Disable warning for deprecated functions in autoconf builds
This gets rid in particular of warnings on auto_ptr. This flag should be removed when 2.3 development start and we switch to unique_ptr.
2015-11-02 16:14:43 +01:00
Jean-Marc Lasgouttes
e1938aa240 Fix some compilation problems in C++11 mode
Only enable std::regex when the header <regex> is present (fix Mac OS X issue).

Remove support for concept checks. The page
  https://gcc.gnu.org/onlinedocs/libstdc++/manual/concept_checking.html
says about concept checking:

  Please note that the checks are based on the requirements in the
  original C++ standard, many of which were relaxed in the C++11
  standard and so valid C++11 code may be incorrectly rejected by the
  concept checks. Additionally, some correct C++03 code might be
  rejected by the concept checks, for example template argument types
  may need to be complete when used in a template definition, rather
  than at the point of instantiation. There are no plans to address
  these shortcomings.

Therefore it seems reasonable to remove our support for this.
2015-09-25 14:12:30 +02:00
Jean-Marc Lasgouttes
b7909e7e6c Remove support for precompiled headers for autotools
This was turned off by default for a long time, and it does not seem
to have any use these days.
2015-09-25 12:05:40 +02:00
Jean-Marc Lasgouttes
7f4101a556 Change --enable-cxx11 configure option to --disable-cxx11 2015-09-25 10:47:42 +02:00
Jean-Marc Lasgouttes
d95c187b5a Give a warning when system boost and stdlib-debug are used together
In general this would lead to an immediate runtime crash because the
runtime checks of libstdc++ change the layout of some STL objects.
Therefore, this will only work when the boost libraries have been
compiled with this same flag. At this time, it is not known whether
any linux distribution contains such libraries.

Fixes bug #9736.
2015-09-22 14:38:31 +02:00
Jean-Marc
a22f7b7001 Do not use -Wfloat-conversion with recent gcc versions 2015-09-10 18:12:35 +02:00
Enrico Forestieri
864a4db26b On cygwin, use -std=gnu++11 instead of -std=c++11
This allows compiling without monkeying with compiler guards.
2015-09-09 02:34:18 +02:00
Enrico Forestieri
bde1bee24e Make it compile on cygwin in c++11 mode
When using -std=c++11, the cygwin compiler automatically defines
__STRICT_ANSI__ which is used as a guard for not declaring essential
unix standard calls such as setenv, popen, etc. As a result,
compilation stops with errors such as "xxxx has not been declared".
By undefining the guard, compilation succeeds and lyx works Ok.
2015-09-09 01:54:49 +02:00
Jean-Marc Lasgouttes
893ae612e4 Use C++11 by default when possible
Compiler that are known to support C++11 (gcc >= 4.3 and clang) are
now used in this mode by default. It is still possible to override
this choice using --(en|dis)able-cxx11.

Moreover, c++11 mode is detected from the compiler itself, not from
the use of --enable-cxx11. This allows to support compilers other
than gcc or clang.

Update INSTALL file accordingly and clean it a little bit.
2015-09-07 11:42:39 +02:00
Jean-Marc Lasgouttes
67385e69fc Improve detection of C++11 mode
This replaces commit 329eae56 with a better solution. Indeed, while
__cpluplus is useless with g++ 4.[3-6] because its value is always 1,
these compilers define __GXX_EXPERIMENTAL_CXX0X__ when "-std c++0x" is used.

Therefore the code now relies on both macros to detect C++11 mode
instead of setting it when --enable-cxx11 is used.

Also, use pure c++ mode instead of gnu++ extensions on gcc
2015-09-03 10:22:56 +02:00
Jean-Marc
e471e6cd49 Do not forget QtSvg when using pkgconfig in autoconf 2015-07-12 19:12:51 +02:00
Jean-Marc Lasgouttes
ba13a832d6 Do not require libm when searching for system boost
Doing so breaks building under Haiku, which does not have libm.

See ticket #7568 for details.
2015-06-11 18:08:19 +02:00
Jessica Hamilton
dcfb918f15 Add packaging support for Haiku
See bug #7568 for details.
2015-06-08 17:18:14 +02:00
Stephan Witt
cadc406363 #9130 Text in main work area isn't rendered with high resolution
Add Qt5Svg for pkgconfig based compile and linker flags setup.
2015-05-20 11:04:26 +02:00
Jean-Marc Lasgouttes
329eae5605 Use explicit macro to declare that we want to use C++11
This replaces tests for __cplusplus >= 201103L, which are wrong with gcc 4.6 and earlier. Indeed these versions of gcc define __cplusplus = 1.

Reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
2015-05-20 10:19:19 +02:00
Stephan Witt
0933df0011 Add Qt's Svg module to the list of used modules. This is required to allow the use of e.g. the QSvgRenderer class. 2015-05-19 22:46:26 +02:00
Georg Baum
7b0485dbb2 Remove gcc 3 traces
We claim that gcc 4.x is needed in INSTALL, so it does not make sense to keep
this old stuff. Instead, I made configure output an error if gcc is too old.
2015-05-10 10:01:33 +02: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
Jean-Marc Lasgouttes
4f3d9d0092 Autotools: configure AR program
Some distros may use target-specific prefix for ar program (like
x86_64-pc-linux-gnu-ar). Automake can handle that since version 1.12.

Since we still support automake 1.8 (not that it is really crucial,
but ubuntu 12.04 ships with automake 1.11.3), make the code
conditional.

Update a bit the gitignore files (automake creates some files in config/).

Based on a patch from Nikolay Orlyuk <virkony@gmail.com>.
2015-05-06 17:08:56 +02:00
Jean-Marc Lasgouttes
3d7ec5e25f Autotool python support: allow to set version in configure.ac. 2015-03-24 12:09:21 +01:00
Jean-Marc Lasgouttes
babe5e05f8 Autotools: check for python >= 2.7.0 or >= 3.3.0
A new macro adapted from AM_PROG_PYTHON is defined. It does the dual version testing for python 2 and python 3. The rest of the functionnality of AM_PROG_PYTHON has been stripped off.

Once our special macro has been invoked, we use the usual AM_PROG_PYTHON.
2015-03-24 10:34:08 +01:00
Scott Kostyshak
36c3495a3a Correct the spelling of "occured" to "occurred" 2015-02-09 18:44:02 -05:00