Commit Graph

1697 Commits

Author SHA1 Message Date
Vadim Zeitlin
e663d9af2b Stop using shared-ld wrapper script under Mac
We don't need to cater for gcc < 3.1 any longer and can just use
-single_module option unconditionally.

This is simpler and avoids spurious errors about "unknown option" when
using -fsanitize=xxx in LDFLAGS from the script.
2021-07-06 14:14:17 +02:00
Vadim Zeitlin
8dfcb582da Regenerate configure after enabling IPv6 support by default
This should have been part of bf5090bcf3 (Enable Winsock 2 and IPv6
build options by default, 2021-04-24), but was forgotten there.
2021-06-15 00:02:25 +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
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
5b719394fe Add library CFLAGS to CXXFLAGS, not CPPFLAGS 2020-09-18 10:02:05 -07:00
Paul Cornett
a8fc92d020 Add -ldl library if needed for dladdr()
It's possible for the dlopen() check to succeed without -ldl, but the dladdr()
check fails without it. This happens with GCC's -fsanitize=address.
2020-09-18 09:52:30 -07:00
Scott Talbert
c315359c72 Fix linking issues with wxGLCanvasEGL for autoconf
1) Link with the wayland-egl library, but do so only if we determine that we
have Wayland support in the GDK backend with a compile test.
2) Provide a way to force disable the EGL backend.
2020-09-12 15:54:15 -07:00
Scott Talbert
7cd12a2bd6 Add EGL-based backend for wxGLCanvas
Among other things, this enables wxGLCanvas to be used natively on
Wayland.

Closes https://github.com/wxWidgets/wxWidgets/pull/2038

Closes #17702.
2020-09-01 15:03:30 +02:00
Teodor Petrov
90082b002d Fix configure errors when using GTK 2 and ASAN
Memory leaks in the test programs run by configure when using GTK 2
result in configuration failures when using -fsanitize=address in
{CXX,LD}FLAGS, so fix these leaks to allow configuring using
"CXXFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address" together with
--with-gtk=2 (this already worked correctly with the default GTK 3).

Closes https://github.com/wxWidgets/wxWidgets/pull/2001
2020-08-14 19:19:46 +02:00
Maarten Bent
4ee04daa7c Enable position independent code by default
Add a build option (--disable-pic, wxBUILD_PIC=OFF) to disable it.

Note that it is always enabled for shared libraries and static third party libraries.
2020-08-06 21:43:41 +02:00
Vadim Zeitlin
d1aa3d5663 Update the version to 3.1.5
This was done by running misc/scripts/inc_release, bakefile_gen and
autoconf.
2020-07-23 16:25:39 +02:00
Vadim Zeitlin
b762d2fb0f Restore -DWXUSINGDLL in wx-config output
This has been broken by the wrong test added in 13b0981eb9 (Get rid of
WXCONFIG_ONLY_CPPFLAGS variable in configure, 2020-02-02), which was
always false because it tested literal "SHARED" instead of the value of
the variable with this name.

This went unnoticed because WXUSINGDLL is not really necessary anyhow
under Unix, but it broke the build of any project building MSW binaries
using wx-config.
2020-07-21 15:17:45 +02:00
Vadim Zeitlin
0df485c928 Fix caching of inotify() availability check in configure
Commit 0fe1146b19 (Cache the result of inotify check in configure,
2020-04-15) was wrong as it defined wxHAS_INOTIFY inside the
AC_CACHE_CHECK(), meaning that this wasn't done at all if the value was
already cached.

Fix this by crrectly defining wxHAS_INOTIFY if inotify() availability
was either detected or cached.
2020-07-18 17:07:22 +02:00
Vadim Zeitlin
36f3164ea0 Pass options needed by it to libtiff configure only
Use non-standard but convenient AX_SUBDIRS_CONFIGURE() macro instead of
the standard AC_CONFIG_SUBDIRS() for libtiff, in order to allow passing
extra options to this sub-configure script without affecting any other
sub-configure ones and also without wrongly caching these options as
part of the main configure options, as happened before.

This notably fixes the problem with running "config.status", which
complained about unknown "--disable-jbig" and similar options, as they
were cached by the previous configure run.

We could also manually remove these options from ac_configure_args, but
doing it like this seems cleaner and simpler.
2020-07-18 16:59:48 +02:00
Vadim Zeitlin
b79173943a Fix problem with caching in sub-configure scripts
Since the changes of ef2b015e39 (Export CC and similar variables for
sub-configure scripts, 2018-10-20), using "-C" option with configure
didn't work any longer when also using built-in libtiff or expat, as
their configure scripts aborted due to detecting inconsistent build
environment because the values of exported CC etc variables they saw
differed from the values in the cache file.

Fixing this seems to be difficult, as we'd need to update the cache
before running the sub-configure scripts (which is simple enough), but
also remove the cached entries from it after doing it, as otherwise we'd
get the same inconsistent build environment problem simply by running
"configure -C" without any other options twice in a row, because the
first run would cache CC=gcc etc.

So work around this instead by disabling cache when exporting these
variables. And to make this workaround less annoying, restrict it to
only the cases when it's really needed, i.e. when we do modify these
variables in a non-trivial way.

With these changes, "configure -C" works again, but only uses caching if
possible.
2020-07-18 16:59:03 +02:00
Vadim Zeitlin
33e8684356 Merge branch 'ios-menu'
Add support for wxMenu under iOS.

See https://github.com/wxWidgets/wxWidgets/pull/1965
2020-07-15 14:25:30 +02:00
Hertatijanto Hartono
7f617d97a5 Add word 'be' for consistency of error message
No real change, just a typo fix after f1f27bc37c (Checks for 3rdparty
libraries availability in configure, 2020-07-13).

Closes https://github.com/wxWidgets/wxWidgets/pull/1969
2020-07-14 22:08:27 +02:00
Vadim Zeitlin
e95ff829ef Remove extra quotes from --with-cxx error message
No real changes, just a cosmetic improvement to the error message given
if the value of --with-cxx=NN option is not recognized.
2020-07-14 20:21:00 +02:00
Vadim Zeitlin
62c168ac21 Add --enable-menubar corresponding to wxUSE_MENUBAR to configure
This is required in order to define wxUSE_MENUBAR for configure builds.
2020-07-14 18:16:59 +02:00
Hertatijanto Hartono
f1f27bc37c Checks for 3rdparty libraries availability in configure
Abort configure run with an error if a 3rd party library doesn't seem to
be present, when it's supposed to be used during the build, as this is
better than postponing the error until make runs into it much later and
also allows us to give a hopefully helpful message telling people that
they might be missing the relevant submodules.

Also add --disable-tests configure option to allow skipping building
tests entirely. In particular, this allows to avoid cloning any
submodules at all when using system libraries on a Unix system.

Closes https://github.com/wxWidgets/wxWidgets/pull/1954
2020-07-13 23:36:31 +02:00
Vadim Zeitlin
b85d4fc758 Don't check macOS symbols when building for iOS in configure
We should probably check __IPHONE_OS_VERSION_MIN_REQUIRED and maybe
MAX_ALLOWED too, but for now just don't give an error in wxiOS builds.
2020-07-05 23:46:34 +02:00
Vadim Zeitlin
232e8677b1 Enforce using C++11 under macOS in configure
There is no reason not to turn it on there, as all compilers/compiler
versions supported under this platform support C++11 too.
2020-07-05 19:50:24 +02:00
Vadim Zeitlin
c01747555f Remove explicit libc++ option, it is the default anyhow now
No supported version still use libstdc++ by default, so remove the
useless option.
2020-07-05 19:37:15 +02:00
Vadim Zeitlin
19dc182b48 Replace Mac OS X with macOS in configure
Use the new Apple OS name in the user-visible messages.
2020-07-05 19:36:29 +02:00
Vadim Zeitlin
94fc2ca6d8 Check minimum macOS version in configure too
Targeting anything less than 10.10 is not supported any longer, so check
for this and also update --with-macosx-version-min description in help
to mention it.
2020-07-05 19:34:27 +02:00