Commit graph

1772 commits

Author SHA1 Message Date
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
Vadim Zeitlin
ee67242b5f Add support for wxUSE_TASKBARBUTTON option to configure
Add new --enable-taskbarbutton option and define wxUSE_TASKBARBUTTON as
1 by default instead of always defining it as 0, as was the case before.

Closes #22900.
2022-10-23 15:03:03 +02:00
Vadim Zeitlin
fba8a119a1 Add Unix files to wxQt build under Unix
Compile Unix, but not GUI toolkit, specific wxDialUpManager, wxJoystick
and wxSound implementations when building wxQt.

Closes #22895, #22896.
2022-10-21 19:01:22 +02:00
Vadim Zeitlin
b2050fcb6f Update to Catch v2
Use Catch2 public header instead of using internal Catch v1 headers: we
can do this now because Catch2 supports (albeit in a rather ugly way)
being used with PCH.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin
fb4f0b590c Remove wxGTK1 port and GPE support
Remove the port files and references to it from the common headers and
elsewhere.

Also remove GPE (GNOME PDA Environment) support as libgpewidget is
unmaintained since 2006 or so and has never been really used.

Use __WXGTK__ to test for any version of wxGTK now. Still define
__WXGTK20__ for compatibility, but always define it now and don't test
for it in the library code.
2022-10-16 22:01:02 +02:00
Vadim Zeitlin
0ef1cdcc21 Remove support for wxMotif
This port hasn't been updated for ages and is not used by anybody any
longer, so remove its code to facilitate maintenance.

Also remove references to this port from the documentation and most of
the other places (VMS-specific descrip.vms files still check for it
because it's not clear how to update them all), including configure.

Regenerate the latter and rebake all makefiles.

Finally document that this port is not available any longer.
2022-10-16 16:39:56 +02:00
Vadim Zeitlin
86348a9d28 Stop testing for pre-standard hash map/set classes
Always use std::unordered_{map,set} when we use them at all, don't
bother with checking for their availability and with tr1 or even older
alternatives.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
a0ae0cd316 Use <type_traits> unconditionally
Don't use or even mention tr1/type_traits any more.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
583a426a37 Use std::string::compare() unconditionally
Don't test for it in configure/CMake and just always use it.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
0a387693c6 Use std::wstring unconditionally
Don't test for its existence in configure and CMake and don't use
wxStdWideString in the code.
2022-10-11 00:45:30 +02:00
Vadim Zeitlin
73869d37fd Always use variadic macros and remove wxNO_VARIADIC_MACROS
Variadic macros are always available in C++11, which will be required
very soon, so don't bother testing for them and just always use them.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
7aea15dda5 Require C++11 in configure 2022-10-11 00:02:28 +02:00
Vadim Zeitlin
327d65be92 Change package version in configure to 3.3.0 2022-10-11 00:02:28 +02:00
Vadim Zeitlin
097abf20b9 Stop disabling deprecation warnings when compiling wxGTK
Don't use blanket warning suppression, as this suppresses even warnings
about using our own deprecated API which is undesirable.
2022-09-25 01:11:55 +02:00
Artur Wieczorek
8a64c8abdc Remove v2.8 compatibility flag, add v3.2 flag 2022-08-02 08:26:04 +02:00
Vadim Zeitlin
6ed6d97bfe Don't use system libcurl under Mac with --disable-sys-libs
It doesn't seem right that the system zlib (installed by e.g. MacPorts)
can be picked up by configure even when --disable-sys-libs is specified,
so disable its use under Mac, as libcurl is optional there.

Still use the system libcurl under Linux in the same case, however, as
it's required to have wxWebRequest at all there and dependency on it is
not really a problem in practice.

This commit is best viewed with Git --color-moved
--color-moved-ws=ignore-all-space -w options.
2022-07-30 15:00:27 +02:00
Vadim Zeitlin
556868390f Merge branch 'statvfs'
Fix statvfs() detection in CMake under NetBSD and prefer statvfs() to
non-portable statfs() more generally.

See #22643.
2022-07-24 16:44:06 +02:00
Vadim Zeitlin
e62e7a6d62 Check for statvfs() first in configure
This POSIX function should be preferred to Linux/BSD-specific statfs()
if it's available (as should always be the case nowadays).

This commit is best viewed with Git --color-moved
--color-moved-ws=ignore-all-space -w options.
2022-07-24 16:43:04 +02:00
Vadim Zeitlin
af4ad43824 Rebake and rerun autoconf after the version update 2022-07-17 17:03:39 +02:00
Mark Harfouche
a157327207 Fix wxrc installation under macOS
Run install_name_tool on wxrc binary again: this used to be done and is
still needed, but was broken in 30915c6163 (Make wxrc independent from
GUI support, 2021-07-07) which moved the code appending the line calling
install_name_tool for wxrc to change-install-name script before this
script creation, meaning that it was simply overwritten later.

See #22620.
2022-07-10 23:28:19 +02:00
Vadim Zeitlin
2a2308d5ed Update version to 3.2.0 and rebake and rerun autoconf
Update all make/project files to use 3.2.0.
2022-06-21 00:54:26 +02:00
Maarten Bent
665692f6a8 Add --enable-webviewedge to configure
It is disabled by default, just like other build systems.
Add -Wno-unknown-pragmas to the configure build too.
2022-05-22 19:20:10 +02:00
Vadim Zeitlin
a7eee933c6 Merge branch 'tsan-warnings'
Fix a harmless warning from thread sanitizer and make wxAtomicInc() more
useful.

See #22417.
2022-05-11 02:37:26 +02:00
Maarten Bent
760bfaa34e Add --with-nanosvg option to configure
So wxUSE_NANOSVG is enabled by default.
2022-05-11 01:55:19 +02:00
Vadim Zeitlin
cf66ce5f94 Return the new value from wxAtomicInc() too
This is easy to do and can be useful when using an atomic initialization
counter.

The only platform where not returning the new value might be more
efficient than returning it is Solaris which is not really relevant any
more and on all the other platforms the functions we were already using
provided this value already (or almost, in case of using gcc builtins,
when we just have to use a different one).
2022-05-11 00:16:47 +02:00