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.
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
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.
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
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
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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
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.