Commit Graph

1882 Commits

Author SHA1 Message Date
Vadim Zeitlin
762c80b809 Handle --with-cxx=20 configure option too
Although wxWidgets doesn't use any C++20 features yet, still allow
compiling it in C++ 20 mode if wanted.

Update the helper macro for detecting available C++ version support from
https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
with just a minor change to de-TAB-ify it to pass our code style check
forbidding indenting with TABs.

Closes #22238.
2022-03-28 00:55:54 +02:00
Lauri Nurmi
d8ddf1307a Fix compilation on recent FreeBSDs by ignoring <sys/epoll.h>
On recent FreeBSDs, the "Linux-only" <sys/epoll.h> exists in the default
include path, and is thus detected by configure. However, the header belongs
to the epoll-shim emulation library, and it is doubtful whether using it
on FreeBSD is a good idea. Therefore check that the operating system
is actually Linux before enabling wxEpollDispatcher.

Closes #22146.
2022-02-25 00:36:53 +01:00
Lauri Nurmi
8b3e0acf75 Fix compilation on 64-bit OpenIndiana (SunOS)
src/unix/mediactrl.cpp failed to compile due to a precision-losing cast
(from 'gpointer' {aka 'void*'} to 'window_id_type' {aka 'unsigned int'}).

Tell pkg-config to use 64-bit configs if building for 64-bit on SunOS.

PKG_CONFIG_PATH is set to /usr/lib/64/pkgconfig in that case.

Documented at:
https://docs.oracle.com/cd/E37838_01/html/E66175/gplhi.html

Closes #22143.
2022-02-20 18:04:38 +01:00
Vadim Zeitlin
271926fde0 Fix description of wxUSE_SPELLCHECK option in configure and CMake
Don't say that it's only for MSW and GTK 3, as it's also available under
Mac. Also don't use "spellchecking" non-word in the description of a
spell-checking option.

No real changes.
2021-10-17 19:36:56 +02:00
Vadim Zeitlin
fc104c8b4f Link only GUI libraries, not wxBase, with gspell
Don't add dependencies on gspell and all GUI libraries that it uses to
wxBase library, only link the GUI libraries with it.

See https://github.com/wxWidgets/wxWidgets/pull/2516
2021-09-15 15:35:33 +02:00
Iwbnwif Yiw
5ba2461fd1 Switch to using GSpell for wxTextCtrl proof checker in wxGTK
Use GSpell rather than GtkSpell because GSpell also allows to check
single line text controls.

Closes https://github.com/wxWidgets/wxWidgets/pull/2516
2021-09-11 14:02:13 +02:00
Vadim Zeitlin
61340fcc82 Merge branch 'textctrl-spellcheck'
Add wxTextCtrl::EnableProofCheck() to use native spell checking support.

See https://github.com/wxWidgets/wxWidgets/pull/2473
2021-08-27 21:58:32 +02:00
Vadim Zeitlin
b6e29ea4d1 Detect Direct2D when building wxMSW with configure
Check for Direct2D headers (only, as DLLs are loaded during run-time
anyhow) and enable Direct2D-based wxGraphicsContext implementation if
they are available when building wxMSW with configure.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
01d3a96043 Reduce configure warnings about missing spell checking support
It's not really useful to warn that spell checking is not available for
the ports for which it's not implemented anyhow, as there is nothing
that the person running configure can do about it anyhow.

Still warn about missing gtkspell library when using GTK 3, however, as
it may be useful to know that it's not available and could be installed
in order to activate spell checking support.
2021-08-23 14:16:54 +02:00
iwbnwif
472aec2d7e Add support for using native spell checking in wxTextCtrl
Add wxTextCtrl::EnableSpellCheck() and implement it for wxMSW and
wxGTK3.

Closes #17544.
2021-08-23 14:15:38 +02:00
Arrigo Marchiori
30915c6163 Make wxrc independent from GUI support
The wxrc program does not depend on the GUI libraries, but only on
the base and XML libraries, so make it possible to build it in non-GUI
builds too.

Closes https://github.com/wxWidgets/wxWidgets/pull/2419
2021-08-06 21:51:11 +02:00
Vadim Zeitlin
bdee83d5ff Fix checks for submodules when using configure --srcdir option
In this case ac_confdir variable is not set, but srcdir still is, so
just use the standard (and also more clear) variable instead.

See https://github.com/wxWidgets/wxWidgets/pull/1954

Closes #19236.
2021-08-02 19:23:40 +02:00
Vadim Zeitlin
a4a65f16f6 Fix linking with builtin regex library
Use the value of wxUSE_REGEX in configure, not its name.
2021-08-02 18:10:20 +02:00
Vadim Zeitlin
32d9b0413d Don't bother checking for size_t, mode_t and off_t neither
The latter two are always defined in sys/types.h on all Unix systems and
we already define them for MSVC (which doesn't use configure anyhow).

The former type is always defined everywhere.
2021-07-28 21:09:32 +02:00
Vadim Zeitlin
244389699e Drop checks for pid_t from autoconf and CMake
This type should always be defined in sys/types.h on any non-ancient
Unix system, so don't bother checking for it, which is not only wasteful
but can even be harmful because it can conflict with pid_t definitions
in the other libraries under Windows, where we (wrongly) define it as
int (which is actually a bug in autoconf, which was recently fixed, see
https://savannah.gnu.org/support/index.php?110296) when using CMake.

So just don't define it at all: it should be already defined under Unix
and we don't use it under MSW anyhow.

See https://github.com/microsoft/vcpkg/issues/19110

See #18150.
2021-07-28 21:01:17 +02:00
Lauri Nurmi
f4eae4df2a Really determine availability of all stdtoxx_l() functions
The case of missing strtod_l() is already handled by 9507bc430e
(Determine availability of the required xlocale API by compiling,
2017-04-14).

Similarly test for all the strto*_l() functions used by wx instead of
assuming that they are available if strtod_l() is.

It appears that the 'musl' C standard library, used on e.g. Alpine
Linux, does have strtod_l(), but not the others. Because of which this
check did not properly disable the feature, and compilation would fail.

Closes https://github.com/wxWidgets/wxWidgets/pull/2451
2021-07-27 17:47:32 +02:00
Vadim Zeitlin
62c776c17c Merge branch 'regex-pcre'
Implement wxRegEx using PCRE2.

See https://github.com/wxWidgets/wxWidgets/pull/2438
2021-07-27 17:47:31 +02:00
Vadim Zeitlin
d50a707b0f Disable use of liblzma by default in configure too
Make configure behaviour consistent with CMake the default value of 0
for wxUSE_LIBLZMA in setup.h under MSW.

This also means that dependency on the system liblzma is not picked up
by default when --disable-sys-libs configure option is used, as this was
rather unexpected.
2021-07-24 20:51:08 +02:00
Vadim Zeitlin
3d8438619d Use PCRE as built-in regex library
Replace the use of Henry Spencer's regex library with PCRE at the build
level and enable wxUSE_PCRE in wxRegEx code to switch to PCRE-based
implementation there.

Note that this has to be done unconditionally because there is no simple
way to select between the previously used regex library and PCRE at the
makefiles level.

We could still keep the possibility to use the system regex library
under Unix, but this doesn't seem to be worth doing, as we don't support
Unicode REs properly when using it (and never did), so drop support for
this too.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
11d89a2233 Show "sys" when system liblzma is detected by configure
This is just a cosmetic change to make the lzma line in the summary
shown by configure at the end consistent with the other libraries.
2021-07-17 17:04:21 +02:00
Tim Stahlhut
3be6800831 Disable libdeflate when using built-in libtiff
This is another library that can be detected and used by libtiff
configure that we don't want to use, as built-in libraries shouldn't
have any external dependencies, so explicitly disable its use, just as
it was already done for libjbig, libwebp and libzstd, see ec4b71afa0
(Update tiff submodule, 2018-11-17) and b7600b0b1b (Ensure jbig support
is disabled for builtin libtiff, 2020-06-17).

Closes https://github.com/wxWidgets/wxWidgets/pull/2394
2021-06-14 23:59:06 +02:00
Vadim Zeitlin
bf5090bcf3 Enable Winsock 2 and IPv6 build options by default
In addition to linking with Winsock 2, also use winsock2.h.

This allows to turn on IPv6 support on by default under MSW, so turn it
on under Unix too for consistency.

Predefine _WINSOCK_DEPRECATED_NO_WARNINGS to avoid warnings about
deprecated (but still available and very unlikely to be ever removed)
Winsock 1 functions that we still use.
2021-04-24 18:06:43 +01:00
Vadim Zeitlin
1dfc18a004 Link with ws2_32.lib rather than obsolete wsock32.lib
Winsock 2 provided by ws2_32.lib is available since 1994, it should be
fine to use it even for wx in 2021.

See #15562.
2021-04-18 22:13:45 +02:00
Vadim Zeitlin
dc5f1711f2 Upgrade version to 3.1.6
Run misc/scripts/inc_release, bakefile_gen and autoconf.
2021-04-14 17:57:27 +02:00
Stefan Csomor
5628a4a334 adding Big Sur update fix
see #19111
(include linking against QuartzCore which contains the kCAContentsFormatRGBA8Uint reference)
2021-04-03 21:12:54 +02:00
Vadim Zeitlin
1cdf59ff92 Remove "basic STL functionality" configure and CMake checks
This check didn't work in configure when using C++17 or later, as
std::bind2nd() is removed in C++17 and so was worse than useless as it
actually prevented --enable-stl from working.

And while it was only done when using C++98 in CMake, it still seems
pretty useless there too as there should be no environments in which
basic stuff like std::vector<> or std::find_if() is not available.

So just remove it entirely.
2021-03-22 18:38:10 +01:00
Stefan Csomor
d1efcc374b Adding GLKit to console and cmake builds 2021-03-15 14:09:07 +01:00
Biswapriyo Nath
ae9b55712d Fix gcc warning when using configure --enable-permissive option
When configured with --enable-permissive option, add -fpermissive to C++
flags, not C flags, to avoid the gcc warning

command-line option '-fpermissive' is valid for C++/ObjC++ but not for C

when compiling C code.

Closes https://github.com/wxWidgets/wxWidgets/pull/2232
2021-02-14 19:45:16 +01:00
Vadim Zeitlin
a81f91114b Make --disable-sys-libs configure option less drastic
Only disable using the system libraries when a built-in version is
available, otherwise still use the system library as this seems more
useful than disabling the use of only some system libraries (liblzma and
libcurl), while still possibly depending on dozens more via GTK.

Update the documentation and remove the now unnecessary --with-libcurl
from the CI script.

Closes https://github.com/wxWidgets/wxWidgets/pull/2208
2021-02-02 13:00:58 +01:00
Vadim Zeitlin
7856a385d1 Fix parallel build of the sample when using configure
Don't add both a directory and its subdirectories to SAMPLES_SUBDIRS as
this can result in 2 sub-makes building in the same directory in
parallel: one make process recursing into sub-subdirectory from the
subdirectory and another one running directly inside it. This notably
results in recurring failures in GitHub Actions CI builds.

We still need to create makefile.in in the subdirectories containing
other samples, so add a separate SAMPLES_SUBTREES variable and use it to
collect such directories, instead of putting them into SAMPLES_SUBDIRS
itself.
2021-02-01 10:43:24 +01:00
Vadim Zeitlin
febd185fc6 Merge branch 'web-request'
Add wxWebViewRequest and related classes allowing to use HTTPS and
HTTP/2.

See https://github.com/wxWidgets/wxWidgets/pull/977
2021-01-17 18:19:47 +01:00
Vadim Zeitlin
4eb345f8fe Fix typo in configure --enable-metafile option help string
Remove the extra "s".

Closes #19045.
2021-01-17 17:33:38 +01:00
Vadim Zeitlin
717e6590bd Merge branch 'macos_wkwebview' of https://github.com/TcT2k/wxWidgets
Use WKWebView for wxWebView Implementation under Apple systems.

See https://github.com/wxWidgets/wxWidgets/pull/2113
2021-01-16 16:20:58 +01:00
Vadim Zeitlin
7d1a7ef942 Respect --disabled-sys-libs when checking for libcurl
Don't use system libcurl if --disabled-sys-libs was used, but warn about
it as this could be unexpected.

We could consider including libcurl as submodule, and use the built-in
version as a fallback, but it's a relatively big repository (100MiB+),
so it's not clear if it would be a good idea to do it.
2021-01-10 21:27:15 +01:00
Vadim Zeitlin
8eab460c0d Sort DEFAULT_wxUSE_XXX in alphabetical order in configure
Just sort the features in the same section in alphabetical order to make
it easier to find the given feature in the list (or confirm that it is
not present).

No real changes.
2021-01-10 19:55:37 +01:00
Dimitri Schoolwerth
f6a43a6074 configure: Fix failing libpng and zlib detection
Since Apple clang version 12 implicit function declarations by default
are (rightfully) an error resulting in failure to compile the configure
tests for libpng and zlib, which make implicit use of exit.

Fix by using return statements (another solution is including stdlib.h).
2020-12-23 01:53:25 +01:00
Tobias Taschner
6d7f35090d
Removed macOS only wxWebKitCtrl
This macOS only class duplicated functionality and code of wxWebView.
2020-12-14 10:17:35 +01:00
Vadim Zeitlin
c6b83194f1 Fix configure wxWebRequest detection and warning logic
Only use wxUSE_WEBREQUEST_{URLSESSION,WINHTTP} under the platforms where
they make sense.

Turn wxUSE_WEBREQUEST off if no backends are available and warn about
it, even under MSW/macOS platforms where this wasn't done previously.
2020-12-13 16:34:47 +01:00
Vadim Zeitlin
ff57081ff2 Fix --with-winhttp configure option
It was never defined because USE_WIN32 wasn't set at the time it was
tested. Fix this by just always defining this option, even though it
only makes sense for MSW.

Also fix the test for winhttp.h, it needs to include windows.h first, as
otherwise compiling the header would always fail.
2020-12-13 14:34:28 +01:00
Vadim Zeitlin
893ebbab0c Disable use of build system pkg-config files when cross-compiling
Using build system libraries for a different host doesn't make sense and
can be actively harmful, so set PKG_CONFIG_LIBDIR to prevent pkg-config
from finding them (it, or PKG_CONFIG_PATH, can still be set to some
host-appropriate directory manually before/when running configure).

This obviates the need for the changes in the previous commit, so revert
it.
2020-12-13 14:24:47 +01:00
Vadim Zeitlin
0db857a460 Disable libcurl test when building wxiOS
It's not really useful in this case and somehow breaks Travis CI build.
2020-12-13 03:18:01 +01:00
Vadim Zeitlin
56e58efcaa Replace --enable-webrequest-xxx configure options with --with-xxx
Using --with is more appropriate for libcurl and WinHTTP as they
introduce dependencies on external libraries and is done for
NSURLSession too for consistency.

And there doesn't seem to be any real reason to make these options names
longer by including "webrequest" in their names, they're clear and
unambiguous enough even without it.
2020-12-13 00:07:10 +01:00
Vadim Zeitlin
efbfa321d6 Add --with-winhttp configure option
This is mostly useful for disabling the use of WinHTTP, e.g. because
only libcurl-based backend will be used or because WinHTTP headers or
libraries are not available and so using it would fail in any case.
2020-12-13 00:07:10 +01:00
Vadim Zeitlin
f35c2d9e58 Use PKG_CHECK_MODULES() to test for libcurl in configure
This is simpler and better (supports cross-compiling, manual override,
...) than doing it manually.

Also disable wxWebRequest completely under Unix if libcurl was not
found, as it's the only backend which can be used on non-MSW/Mac
platforms.
2020-12-13 00:07:08 +01:00
Vadim Zeitlin
6bdab7b3c8 Merge branch 'master' into web-request
Merge with the latest master in preparation for merging into master.

Rebake to resolve conflicts in generated files.
2020-12-12 18:12:25 +01:00
Paul Cornett
0cae4399bd Make awk script compatible with default Solaris /usr/bin/awk
See #18950
2020-10-25 23:31:47 -07:00
Vadim Zeitlin
da3aef753e Remove variadic macros test from configure
This is useless, all still supported compilers except ancient MSVS
versions (for which configure is not used anyhow) support variadic
macros, so don't waste time testing for them.

Note that the checks for HAVE_VARIADIC_MACROS in the sources are still
left because it is still possible to explicitly disable variadic macros
support using --disable-vararg_macros for strict C++98 compatibility.
2020-10-20 01:59:00 +02:00
Vadim Zeitlin
426a0ed527 Remove HAVE_W32API_H definition and checks
All still supported versions of MinGW/Cygwin provide w32api.h file, so
there is no need to test for it.

This allows to simplify the code, but also remove the definition of
HAVE_W32API_H from bake- and makefiles and this, in turn, allows to get
rid of extra flags in MinGW format entirely, as we don't support gcc
2.95 for which they were originally needed neither.
2020-10-20 01:47:47 +02:00
Paul Cornett
9c7b340d83 Don't override user-supplied CPPFLAGS
Ordering matters for include directives, so add to the end, not the front.
2020-09-18 10:08:24 -07:00
Paul Cornett
5b719394fe Add library CFLAGS to CXXFLAGS, not CPPFLAGS 2020-09-18 10:02:05 -07:00