Commit graph

1799 commits

Author SHA1 Message Date
Vadim Zeitlin
118ca49284 Improve reporting of enabled wxWebView backends in configure
Don't report "IE" backend as being enabled just because it's enabled by
default under MSW.

Also give a warning if any of MSW-specific backends is enabled when not
building wxMSW.
2023-09-13 21:26:42 +02:00
Vadim Zeitlin
704e5f1419 Improve CEF detection in configure
Check for the libraries too and not just for headers.

Also cache the result of the check.
2023-09-06 03:50:05 +02:00
Vadim Zeitlin
b4380b5f9e Use C++14 by default in configure when using CEF
Don't default to C++11 as CEF headers are not compatible with it, so
configure would succeed but the build would then fail.
2023-09-06 03:50:05 +02:00
Vadim Zeitlin
6762d5eaa5 Merge branch 'master' into webview-chromium
Merge the changes required by wxWebViewChromium, notably support for the
entry hooks and new wxDynamicLibrary::ListLoaded() Unix implementation.
2023-09-06 03:49:49 +02:00
Vadim Zeitlin
aec49d9c9d Use dl_iterate_phdr() in wxDynamicLibrary::ListLoaded()
This has the advantage of returning libraries in their load order, which
is more useful than the unspecified order that was used before.

It also means that this function now has a chance of working under other
systems such as FreeBSD, which also provides dl_iterate_phdr().
2023-09-06 00:40:11 +02:00
Vadim Zeitlin
8ed74043fa Fix configure option for enabling CEF backend
Remove space between WX_ARG_ENABLE and the opening parenthesis, this is
not allowed in m4 syntax.

Also give an error, not a warning, if CEF header is not found as it
should exist if this option was explicitly specified.
2023-08-30 02:03:13 +02:00
Vadim Zeitlin
b6bfdd97c9 Merge branch 'master' into webview-chromium
Update to the latest master.
2023-08-30 02:03:00 +02:00
Vadim Zeitlin
e8fdb66741 Merge branch 'improve-configure'
Modernize configure.

See #23730.
2023-07-28 13:25:52 +02:00
Vadim Zeitlin
703d815ef8 Make configure message for zlib consistent with the other ones
All the other messages use "system $LIBRARY not found", and just zlib
didn't use "system" for some reason -- add it now so that the messages
are consistent when several of them are given.

This is a purely cosmetic changes.
2023-07-24 18:18:05 +02:00
Vadim Zeitlin
a921f558d9 Remove configure.in to configure.ac
This is the extension expected by all non-ancient autoconf versions.
2023-07-24 00:11:26 +02:00
Vadim Zeitlin
00960b40b9 Replace obsolete AC_TRY_XXX macros with AC_XXX_IFELSE
No real changes, just avoid warnings from autoconf 2.71 when
regenerating configure.

Note that double brackets must be used around any code using brackets to
preserve them during the expansion.
2023-07-24 00:11:23 +02:00
Vadim Zeitlin
04f7e0664b Replace AM_PATH_GTK_N_0() macros with use of PKG_CHECK_MODULES()
There is no reason not to use pkg-config nowadays and this allows to get
rid of some third-party m4 files, which is always nice, and avoids
warnings about GTK 3 and 4 macros being obsolete when regenerating
configure with autoconf 2.71.
2023-07-24 00:00:18 +02:00
Vadim Zeitlin
57c71a4547 Only include Scintilla libraries in wx-config --libs if needed
Don't always output -lscintilla and -llexilla in wx-config --libs, as
they are not needed unless linking with wxstc library is requested but
204bc3c887 (Fix linking of wxscintilla in static monolithic build,
2017-12-06) added them unconditionally.

Improve this by putting them in a separate WXCONFIG_STC_LIBS instead of
WXCONFIG_LIBS used for all libraries (even wxbase, which is wrong on its
own).

Also see #23643.
2023-07-23 02:35:53 +02:00
Vadim Zeitlin
340320d63c Fix using system libtiff installed in non-standard location
Add the required CFLAGS (such as the path to libtiff headers if they are
not in one of the system directories) to CXXFLAGS, not CFLAGS, as we're
using libtiff from C++ code.

This fixes a problem introduced in b9fe8ca10c (Try to use pkg-config for
detecting libtiff in configure, 2018-12-12).

Closes #23702.

Closes #23703.
2023-07-20 15:19:03 +02:00
Vadim Zeitlin
f072544bd5 Assume sigaction::sa_handler always takes "int"
This is the standard and there doesn't seem to be any contemporary
systems where this is not the case. The configure check for it was
originally added in 101c20d554 (attempting to fix sa_handler signature
for IRIX, 2000-04-01), but IRIX is not supported/doesn't exist any
longer, so don't waste time on checking for this.

The real motivation for this change is that the test failed in CMake
builds, showing just

-- Performing Test wxTYPE_SA_HANDLER_IS_INT - Failed

in the log and then resulting in -fpermissive warnings when assigning
wxFatalSignalHandler to sa_handler and it's simpler to just remove the
check than to debug it.

See #23664.
2023-06-30 00:26:19 +01:00
Maarten Bent
d215181c38
Add lexilla to wx-config --libs in static build
Fixes #23643
2023-06-17 15:13:03 +02:00
Vadim Zeitlin
d78399dcc9 Merge branch 'webkit2_support_4.1' of https://github.com/swt2c/wxWidgets
Add support for building WebView with libwebkit2gtk-4.1.

See #23633.
2023-06-15 23:42:11 +02:00
Scott Talbert
1b86644266 Add support for building WebView with libwebkit2gtk-4.1
libwebkit2gtk-4.1 has the same API as libwebkit2gtk-4.0, except that the
former links with libsoup-3.0 and the latter links with libsoup-2.4.

Fixes #23630.
2023-06-13 18:13:59 -04:00
Vadim Zeitlin
58c49d06fa Minor updates to wxUIActionSimulator documentation
Don't say that it's experimental in configure but do mention that it
doesn't work under Wayland.

Closes #23619.
2023-06-08 01:26:16 +02:00
Vadim Zeitlin
a0e3f1e1ab Use grep instead of fgrep and egrep
The latter are deprecated and shouldn't be used any longer.

No real changes.

Closes #23537.
2023-05-10 23:44:17 +02:00
Vadim Zeitlin
889845fbc4 Add support for wxNO_IMPLICIT_WXSTRING_CONV_TO_PTR to wxString
This symbol is similar to the existing wxNO_IMPLICIT_WXSTRING_ENCODING
and can be defined when building the application (as opposed to when
building the library) to disable implicit wxString conversions to
pointer types, i.e. char*, wchat_t* and void*.

This makes the just added wxUSE_CHAR_CONV_IN_WXSTRING library build
option unnecessary, so remove it.
2023-04-16 01:16:56 +02:00
Vadim Zeitlin
35c35c235e Remove wxUSE_STL which is not really used any longer
wxString is always based on std::[w]string since 2c0c727f49 (Remove wx
own wxStringImpl implementation, 2022-11-16) and all containers use
standard containers by default too now -- and there is a separate
wxUSE_STD_CONTAINERS for this anyhow.

The only remaining use of wxUSE_STL was as the default value for
wxUSE_STD_STRING_CONV_IN_WXSTRING option, but it's not really needed
for this neither, and this option can just be set to 0 by default.

Also add wxUSE_CHAR_CONV_IN_WXSTRING which can now be set to 0 too to
disable all unwanted implicit conversions (even "safe" ones, to wide
strings, in addition to the unsafe ones to narrow strings that could be
already disabled with wxUSE_UNSAFE_WXSTRING_CONV) to allow people who
don't want to have any implicit conversions at all to do it.

Keep --enable-stl configure option for compatibility, but warn if it is
used to tell people that it is not needed any longer.
2023-04-15 17:22:09 +02:00
Vadim Zeitlin
fb17a5ac38 Merge branch 'use-std-cont-1'
Set wxUSE_STD_CONTAINERS=1 by default.

See #23439.
2023-04-15 15:46:08 +02:00
Vadim Zeitlin
6485e0200f Define __WXGTK20__ again for wxGTK 3 builds
This was accidentally broken in fb4f0b590c (Remove wxGTK1 port and GPE
support, 2022-10-16): even though the commit message explicitly said
that __WXGTK20__ was still defined, it actually wasn't any more.

Fix this now by just doing it always when using wxGTK. This allows to
drop WXGTK2 variable entirely, as it's not used any longer and we don't
need to set it.

Closes #23444.
2023-04-12 19:30:57 +02:00
Vadim Zeitlin
e273d45c9b Enable use of the standard container classes by default
This is mostly, even if not completely, compatible with the previous
default build using wxUSE_STD_CONTAINERS=0, so try enabling this by
default again. Hopefully it should work better now than the last time we
tried it, see 01871bf642 (Add wxUSE_STD_CONTAINERS and turn it on by
default., 2011-03-30) and the subsequent 7311debd0d (Don't use the
standard containers by default., 2011-05-13).

See #22718.
2023-04-10 17:00:32 +01:00
Ivan Sorokin
2c0f6a2aa0 Fix wxKeyEvent::GetKeyCode() for non-US keyboard layouts
Use the key code corresponding to the key in the US keyboard layout for
the key down/up events even when not actually using US layout, as this
is much more useful than simply returning 0 as was done before.

It also is compatible with the behaviour of the other ports.

Closes #17643.

Closes #23379.

See #23410.
2023-04-01 20:14:02 +02:00
Vadim Zeitlin
0f0ac39800 Don't claim that wxUSE_UNICODE_UTF8 is Unix-specific
It can be used under MSW too.
2023-03-24 19:17:59 +01:00
Paul Cornett
30181a9dd9 Fix handling of duplicate -arch or -framework options
See #23356
2023-03-17 11:56:59 -07:00
Vadim Zeitlin
9b0ebf2c3a Don't use -mthreads option when building with MinGW
This option seems to be obsolete and was only ever needed for classic
MinGW32 which is not even supported any more.

This basically reverts a0b9e27fd4 (Applied Fabian Wenzel's patches to
add -mthreads for threads to work in MinGW., 2002-08-28).

See #23314.

Closes #23316.
2023-03-07 19:28:34 +01:00
Vadim Zeitlin
dcfe387102 Add checks for Scintilla and Lexilla submodules to configure too
Hopefully this will save some time to people building wx from Git.

Closes #23290.
2023-02-23 18:07:19 +01:00
Vadim Zeitlin
e5380e739b Remove Alpha architecture detection
This architecture doesn't exist and is not supported since a very long
time, so stop testing for it and defining __ALPHA__ which was never used
anyhow.
2023-01-26 17:31:05 +01:00
Vadim Zeitlin
15e556e027 Remove vestiges of PowerPC support
It may still be supported for wxGTK, but we don't need to do anything
special for it, so we don't need to define __POWERPC__, which was never
used anyhow, neither.
2023-01-26 17:27:48 +01:00
Vadim Zeitlin
b0056f8ce5 Re-re-enable using pkg-config when targeting Linux systems
The change of 7899850496 (Do use host-specific pkg-config when
cross-compiling, 2022-12-15) should have been done in addition to the
previous logic instead of replacing it, as it has resulted in not using
pkg-config any more when targeting Linux systems, which wasn't the
intention.

So re-apply the changes of d6ddfe87e1 (Disable build system pkg-config
when cross-compiling to non-Linux, 2022-11-30) to handle cross-compiling
to Linux specially.

This makes the logic even uglier than before, but it still seems like
the most pragmatic solution and the original intention was always to do
this and not the wrongly simplified version that was actually applied.

See #22886, #23037, #23171.
2023-01-25 01:12:36 +01:00
Vadim Zeitlin
e89f05faba Remove memory debugging/tracing support and all related options
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.

Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.

Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
2023-01-05 21:41:38 +01:00
Vadim Zeitlin
d74c9e51da Remove memcheck sample
This sample wasn't really useful and demonstrated functionality which
was disabled by default since many years and will be completely removed
soon.
2023-01-05 18:24:57 +01:00
Vadim Zeitlin
7899850496 Do use host-specific pkg-config when cross-compiling
This re-enables the use of $host-pkg-config after it was disabled again
by d6ddfe87e1 (Disable build system pkg-config when cross-compiling to
non-Linux, 2022-11-30).

Closes #23037.
2022-12-23 19:24:30 +01:00
Vadim Zeitlin
0f54ec8b36 Update configure after the changes of the last commit
This should have been included in it but was forgotten.
2022-12-04 13:33:36 +00:00
Paul Cornett
471c642979 Simplify configure check for Cairo
Instead of checking for Cairo and then checking for
a function in Cairo 1.2, just check for Cairo 1.2.
2022-11-30 09:22:23 -08:00
Vadim Zeitlin
d6ddfe87e1 Disable build system pkg-config when cross-compiling to non-Linux
This restores a modified form of the original commit 893ebbab0c (Disable
use of build system pkg-config files when cross-compiling, 2020-12-13),
thus mostly reverting 6dbf59f34f (Revert "Disable use of build system
pkg-config files when cross-compiling", 2022-10-25) and now disables the
use of build system pkg-config files only when cross-compiling for
non-Linux hosts.

This seems like the best behaviour by default because it avoids
unexpected problems when cross-compiling for MSW or iOS where build
system .pc files should never be used, but still uses these files, if
they are available, when cross-compiling for other Linux systems.

This is Linux-specific currently but should probably be extended to
other Unix systems too. In any case, the default behaviour can always be
overridden by setting PKG_CONFIG_LIBDIR manually.

See #22886.
2022-11-30 02:18:38 +01:00
Paul Cornett
7d070a7e83 Remove HAVE_ROUND, it is not used anymore 2022-11-28 09:11:01 -08:00
Vadim Zeitlin
280dbce37e Restore configure tests disabled by GTK1 support removal
The changes of fb4f0b590c (Remove wxGTK1 port and GPE support,
2022-10-16) accidentally disabled several checks that were supposed to
be done when using wxGTK, notably for GTK print library.

This was due to WXGTK2 not being defined any longer and is fixed now by
replacing the tests for it with tests for wxUSE_GTK (as WXGTK2 used to
mean "any GTK version other than 1", and not "GTK version 2").

Closes #22994.
2022-11-26 20:24:15 +01:00
Vadim Zeitlin
be7860c766 Remove wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY
Assume they are always 1 now, there is no good reason to ever set them
to 0 any more.

Note that we still keep wxUSE_STD_IOSTREAM for now, but we can drop
wxUSE_STD_DEFAULT as it's not worth having it just for this single
option (previously it was used as the default value for 3 of them).
2022-11-17 00:40:50 +01:00
Vadim Zeitlin
b4b23ac423 Merge branch 'always-use-thread-local'
Always use thread_local as we can rely on compiler TLS support working
under Windows 7 and later.

There are some known problems in MinGW thread local variable support,
but they only affect (obsolete) 32-bit builds and will hopefully be
fixed in this compiler soon.

See #22917.
2022-11-10 16:32:42 +01:00
Mojca Miklavec
da4b42688a Fix implicit declaration configuration errors with Xcode 12
Some configure could fail with errors like the following:

conftest.c:56:33: error: implicitly declaring library function 'exit'
with type 'void (int) __attribute__((noreturn))'
[-Werror,-Wimplicit-function-declaration]

See https://trac.macports.org/ticket/61672

Closes #22946.
2022-11-08 18:49:08 +01:00
Vadim Zeitlin
31ac8012e4 Remove Unicode option support from wx-config and wxwin.m4
Keep the option itself, but hardcode its value.
2022-10-28 01:11:36 +02:00
Vadim Zeitlin
c78b0d652b Remove UNICODE build option, hardcode its value as 1
Also hardcode "u" suffix for the library names -- it doesn't make sense
any longer, but we need to keep it for compatibility.
2022-10-27 19:43:59 +02:00
Vadim Zeitlin
a60c9b0f5e Remove --disable-unicode option from configure
Disabling Unicode support is not supported any longer.

Also report Unicode encoding used by wxString at the end of running
configure, this is more useful than just saying "wchar_t", as it's
platform-dependent.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
4e802e6fc7 Remove wxUSE_COMPILER_TLS and always use C++11 thread_local
Don't use compiler-specific __thread and use the standard keyword
instead.

Keep the existing TLS-related macros for compatibility, but remove our
custom implementation of them, so that they're always trivial now.
2022-10-26 03:31:54 +02:00
Vadim Zeitlin
6dbf59f34f Revert "Disable use of build system pkg-config files when cross-compiling"
This reverts commit 893ebbab0c because it
breaks cross-compiling using target-specific pkg-config installed on the
main system, which is a perfectly legitimate use case.

To avoid the original problem fixed by that commit, PKG_CONFIG_LIBDIR
needs to be set manually before running configure when using host
pkg-config -- but not when using target pkg-config.

Closes #22886.
2022-10-25 18:51:31 +02:00
Vadim Zeitlin
4e52fbc4b5 Merge branch 'qt-fixes'
Various wxQt build fixes.

See #22902.
2022-10-23 15:55:03 +02:00