This was broken by 9507bc430e which
stopped defining HAVE_LOCALE_T in configure but didn't update the code
using it.
Restore the old behaviour by continuing to define HAVE_LOCALE_T even if
we don't test (just) for it any longer.
See https://github.com/wxWidgets/wxWidgets/pull/461
A recent change fixing monolithic build broke the normal build when
using built-in libraries under Unix as -lwxzlib now came before -lwxpng
and so zlib symbols used by libpng were not found (in fact, they could
still be found in the system library which is usually available under
Unix, so the problem wasn't seen immediately, but it was still there).
See https://github.com/wxWidgets/wxWidgets/pull/621
wx-config didn't report -lwxscintilla for `wx-config --libs stc` in static
monolithic build.
Since stc is a part of monolithic lib, -lwxscintilla will be reported
for `wx-config --libs` now as well.
Include 3rd party libs in wx-config output even when using the system,
and not the built-in, versions of them for static monolithic build.
See https://github.com/wxWidgets/wxWidgets/pull/621
Currently lzma and jbig libraries are checked only for builtin
libtiff. When the system libtiff is built with lzma and jbig
support and when the `--with-libtiff=sys` flag is specified
the configure script will fail, due to missing linking with
lzma and jbig.
Fixed this by moving lzma and jbig checks from libtiff-builin check
above all libtiff checks. Also added lzma and jbig libs to
EXTRALIBS_GUI.
See https://github.com/wxWidgets/wxWidgets/pull/619
Only define it unconditionally for wxMSW and wxOSX, not wxGTK where we
need to test that the required versions of FontConfig and Pango Fc are
available.
Also do all wxUSE_PRIVATE_FONTS-related checks in the same place, to
make things more clear and avoid similar blunders in the future.
Handle this feature as all the other ones and provide a configure switch
and a setup.h option to disable it if necessary, as it may be desirable
to do it, especially under Linux, to avoid extra dependency on pangoft2
if this functionality is unnecessary.
We need to use PKG_CHECK_MODULES(pangoft2) anyhow because we need to
link with its libraries, so make the version check there too and
simplify wxFont::AddPrivateFont() implementation in wxGTK.
FcConfigAppFontAddFile() that we use is only available since 2.8, so
check for at least this version of the library in configure.
Also change the macro guarding its use to the more semantically
appropriate "wxHAVE" rather than "wxUSE" and make it more precise by
adding "2_8_0" suffix to it.
There are no longer any qt headers included in wx/qt headers.
Applications do not need to link with qt librarys anymore, only wxqt libraries.
wxWindow and derived widgets only contain one pointer to their qtwidget, no longer
carrying both base and derived pointers in parallel as was before.
Drop the legacy CppUnit testing framework used for the unit tests.
Replacing it with Catch has the advantage of not requiring CppUnit
libraries to be installed on the system in order to be able to run
tests (Catch is header-only and a copy of it is now included in the
main repository itself) and, in the future, of being able to write
the tests in a much more natural way.
For now, however, avoid changing the existing tests code as much as
[reasonably] possible to avoid introducing bugs in them and provide
the CppUnit compatibility macros in the new wx/catch_cppunit.h header
which allow to preserve the 99% of the existing code unchanged. Some
of the required changes are:
- Decompose asserts using "a && b" conditions into multiple asserts
checking "a" and "b" independently. This would have been better
even with CppUnit (to know which part of condition exactly failed)
and is required with Catch.
- Use extra parentheses around such conditions when they can't be
easily decomposed in the arrays test, due to the use of macros.
This is not ideal from the point of view of messages given when
the tests fail but will do for now.
- Rewrite asserts using "a || b" as a combination of condition
checks and assert macros. Again, this is better anyhow, and is
required with Catch. Incidentally, this allowed to fix a bug in
the "exec" unit test which didn't leave enough time for the new
process to be launched before trying to kill it.
- Remove multiple CPPUNIT_TEST_SUITE_NAMED_REGISTRATION() macros,
our emulation of this macro can be used only once.
- Provide string conversions using Catch-specific StringMaker for
a couple of types.
- Replace custom wxImage comparison with a Catch-specific matcher
class.
- Remove most of test running logic from test.cpp, in particular don't
parse command line ourselves any longer but use Catch built-in
command line parser. This is a source of a minor regression:
previously, both "Foo" and "FooTestCase" could be used as the name of
the test to run, but now only the latter is accepted.
The speed advantage from using them is very variable, rarely big and
sometimes even negative, while the space penalty is consistently huge,
so it doesn't seem like a good trade-off to enable them by default.
Don't even check for options such as --with-macosx-xxx or
--enable-universal_binaries when not targeting macOS, as they only make
sense for this platform.
Configure options such as --enable-universal_binary or
--with-macosx-version-min should be taken into account for any port
being built under macOS, not just wxOSX itself.
In particular, this ensures that PCH and dependencies tracking is
correctly disabled automatically when building universal wxGTK
libraries.
Closes#15454.
This function tries to determine the preferred first day of week to use in
calendars. The procedure for obtaining this information is highly
platform-dependent, and is not possible on all platforms; in that case
Sunday is used as the fallback value.
Implementations are included for MSW, OSX, and Linux.
Only --with-<toolkit> options make sense, something like --without-x11
couldn't possibly be useful and was actually actively harmful as it set
wxUSE_UNIVERSAL to 1 as a side effect.
Closes#2306.
Give an error if an unknown option is specified because this is very helpful
for catching typos which happen quite frequently in practice, considering the
number of options that we have.
To explicitly allow unknown options, i.e. restore the old behaviour,
--disable-option-checking can be used.
This option didn't do anything for the last 14 years, ever since the switch to
bakefile-generated makefiles in fe0895cf82, so
remove it from configure and stop mentioning it in documentation.
Use --disable-dependency-tracking to do what this option used to be doing 15
years ago.
This reverts commit 2a3721bf98 because it
requires further changes in bakefile itself to really work under Mac, where
the build would be broken as soon as configure would be regenerated (which was
forgotten by that commit due to another error, and so the two errors finally
cancelled out).
Also, remove the other calls to PKG_PROG_PKG_CONFIG which are then no longer
necessary.
This ensures that all PKG_CHECK_MODULES() calls work correctly and, in
particular, fixes detecting cppunit under macOS and, due to this, Travis CI
build.
Even if <xlocale.h> exists, the whole API that wx requires (specifically
strtod_l() and similar) may not be available. This is the case
on e.g. OpenIndiana (SunOS).
On OpenIndiana (SunOS) the result is different when compiled as C,
and the C++ result is what matters to wxWidgets.
Fixes compilation of src/common/strconv.cpp on OpenIndiana.
In configure moved WX_ARG_FEATURE(regkey outside of if.
Have configure under windows skip linking to X11.
Have configure check for "USE_WIN32" instead of for "wxUSE_MSW".
wxUSE_FSWATCHER
wxUSE_SNGLINST_CHECKER
wxUSE_SOCKETS
wxUSE_DIB
While we have to keep these conversions enabled by default, they are very
dangerous as they can result in silent data loss on any system not using a
locale with UTF-8 encoding, i.e. always under MSW.
Allow mitigating this by defining wxNO_UNSAFE_WXSTRING_CONV when compiling the
application code using the library, which makes these conversions invisible to
the user code, and so can be used without recompiling the library.
Also add wxUSE_UNSAFE_WXSTRING_CONV which can be set to 0 when compiling the
library to disable these conversions globally for all applications using it.
Closes#11830.
Compile accessibility support on Windows by default now that the generic
wxDataViewCtrl control implements accessible interface. After the
changes from 7dab555f71, accessibility
support is much more lightweight and doesn't interfere with normal win32
behavior, so this change shouldn't affect accessibility-unaware code in
any way.
The changes in 065135adcc caused AVKit to be linked even when the deployment target was set to 10.7 or 10.8 which would not be available on the target machine. The deployment target is now checked before using AVKit.
QTKit has been removed from OS X 10.12 SDK.
QTKit has been superseded by AVFoundation since OS X 10.7.
Since wxWidgets >= 3.1 requires 10.7 anyway there is no reason to support the old API.
Additionally the AVFoundation implementation may use AVKit (available since 10.9). It will be used when available and the deployment target is met.
Closes https://github.com/wxWidgets/wxWidgets/pull/337
Since OS X Sierra 10.12 QTKit has been removed. wxMediaCtrl for OS X already had a fallback to AVFoundation implemented. This makes sure this will be used and the correct media Frameworks are used for linking.
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.
Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).