Commit Graph

1828 Commits

Author SHA1 Message Date
b3c612268b update check config to work without cario on win32/macos 2020-10-05 15:46:22 +01:00
Paul Cornett
9c7b340d83 Don't override user-supplied CPPFLAGS
Ordering matters for include directives, so add to the end, not the front.
2020-09-18 10:08:24 -07: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
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
Vadim Zeitlin
a4f9e207dc Make macOS configure error messages even more precise
Mention the configure options to use to correct the problem explicitly.

Also restore the use AC_MSG_FAILURE() instead of AC_MSG_ERROR(), this
was originally correct and just the calls to exit() were unnecessary.
2020-07-05 19:29:26 +02:00
Vadim Zeitlin
9b02dbf8b2 Correct minimum supported Xcode version, it's 7.2.1, not 7.3
This correction is important because 7.2 can be used under macOS 10.10,
unlike 7.3.
2020-07-05 19:15:50 +02:00
Vadim Zeitlin
101a693bc2 Add check for 10.11 SDK to configure
Verify that we're using a supported version of SDK and further improve
the error message if building a test program fails to mention that Xcode
7.3 or later is required.
2020-07-05 18:21:58 +02:00
Vadim Zeitlin
bbf1953051 Improve error messages if configure build test fails under macOS
Telling people to try using a different SDK was rather confusing if they
didn't specify any SDK in the first place and not very helpful if the
problem was due to specifying an incompatible minimum OS version, so fix
both problems at once by using the appropriate error message depending
on the configure options actually used.
2020-07-05 18:16:00 +02:00
Vadim Zeitlin
01ac922431 Use 10.10 as minimum macOS version by default in configure
Just bump the default to 10.10 from the old 10.9.
2020-07-05 18:12:33 +02:00
Vadim Zeitlin
103daf60d4 Don't remove multiple -arch flags from configure flags neither
The changes of 273e2e7343 (Remove duplicated flags from
{C,CPP,CXX,LD}FLAGS in configure, 2020-02-12) took care to leave
multiple -framework flags in LDFLAGS because removing them would be
wrong, but we also need to avoid removing -arch flags, that can possibly
appear multiple times (when using universal binaries) as well.

Change dedup_flags() itself to keep a list of exceptions to pass through
without checking that they're unique. If this list becomes longer in the
future, we could use an array and use "$0 in array" instead of multiple
"==" checks, but for now keep things simple.
2020-07-01 18:45:11 +02:00
Vadim Zeitlin
d7c6dc6235 Default to building wxOSX, not wxiOS, under Apple ARM platforms
Now that desktop Macs using ARM exist, we should default to building the
normal, macOS-targeting, port on them and not wxiOS any more.

This is a backwards incompatible change, but it shouldn't affect many
people, so should hopefully be fine.
2020-07-01 18:33:48 +02:00
Vadim Zeitlin
f66199222e Remove obsolete code using sleep() in wxMicroSleep() for BeOS
This code never worked (as proved by the conversion in it which was
wrong by a factor of 1e12) and should never be needed anyhow.

Simplify configure and give an error, not warning, if neither
nanosleep() nor usleep() are available, as otherwise we'd just get a
build error later when compiling utilsunx.cpp later.
2020-06-26 18:49:32 +02:00
Ian McInerney
b7600b0b1b Ensure jbig support is disabled for builtin libtiff 2020-06-17 23:14:01 +01:00
Ian McInerney
10a958562d Fix configure for builtin libtiff
We need to ensure the configure arguments to disable features
are passed in immediately before calling, because the builtin
is the fallback if the system library is not found.

Fixes #18791
2020-06-17 22:46:48 +01:00
Vadim Zeitlin
a087d7c8da Merge branch 'fix-stc-ime' of https://github.com/wangqr/wxWidgets
Fix position of IME in wxSTC in wxMSW.

See https://github.com/wxWidgets/wxWidgets/pull/1852
2020-05-25 01:33:00 +02:00
Vadim Zeitlin
7a82a0bbf5 Assume dlerror() function is always available when dlopen() is
Remove separate checks for dlerror() which don't seem to be needed under
any platform any longer.

No real changes, just slim down configure/CMake a tiny bit.
2020-05-15 00:00:06 +02:00
Vadim Zeitlin
fea8c608b1 Remove checks for shl_load() from configure/CMake
This function is not used any more since e289eb07e1 (Get rid of
non-POSIX code for loading dynlibs on *nix, 2020-05-13), so don't check
for it and don't defined the corresponding HAVE_SHL_LOAD symbol.
2020-05-14 23:59:38 +02:00
wangqr
59370f36c8 Add imm32.lib to wxStyledTextCtrl in configure.in 2020-05-11 15:11:21 -04:00
Paul Cornett
44ba9d1d07 Change default GTK version for configure from 2 to 3 2020-04-19 21:59:16 -07:00
Vadim Zeitlin
0fe1146b19 Cache the result of inotify check in configure
Wrap AC_LINK_IFELSE() in AC_CACHE_CHECK() to skip it if the result is
already cached.
2020-04-15 18:04:56 +02:00
Oliver Kiddle
1eaa510c05 Check usability of inotify before selecting it
A libinotify compatibility library exists for BSD systems. If this
was installed, configure would find sys/inotify.h but the build
would fail to link unless the library was added to the link line.
By also checking for inotify_init() this problem can be avoided.

Given that there is native support for kqueue, there is no need
to handle linking with libinotify.
2020-04-15 17:28:09 +02:00
Vadim Zeitlin
482426f4fc Use correct toolkit name in wxUniv error message in configure
$TOOLKIT refers to the underlying toolkit, while the error message
should really indicate that the missing functionality is in wxUniv.
2020-02-17 19:29:26 +01:00
Vadim Zeitlin
273e2e7343 Remove duplicated flags from {C,CPP,CXX,LD}FLAGS in configure
This results in much shorter compilation lines and hence much shorter
build logs, which makes examining them simpler.

There should be no real changes, as we should never use duplicated
options intentionally.
2020-02-12 04:12:04 +01:00
Vadim Zeitlin
ec091c9f2b Don't override CFLAGS etc in configure-generated makefile
CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS are supposed to be under
user-control and putting configure-determined options in them broke
something as simple as running "make CXXFLAGS=-Wno-some-extra-warning"
because this overrode the CXXFLAGS set by configure and required for
build.

Improve this by using WX_*FLAGS in the generated makefile and leaving
the user-controlled FLAGS alone. This is still not ideal as running
"configure CFLAGS=-DFOO" and then "make CFLAGS=-DBAR" will define both
FOO and BAR, as configure copies CFLAGS to WX_CFLAGS, and so setting it
on make command line won't override it, as it should, but this should be
a much more rare and also much less severe problem, so we should be able
to live with it for now.

Normally this commit shouldn't result in any user-visible changes, i.e.
it shouldn't break any previously working scenarios and only make some
previously broken ones work.
2020-02-11 23:19:31 +01:00
Vadim Zeitlin
13b0981eb9 Get rid of WXCONFIG_ONLY_CPPFLAGS variable in configure
This variable was set and used exactly once, so just remove it to
simplify things.

No real changes.
2020-02-11 23:19:30 +01:00
Vadim Zeitlin
028afa194a Add wxUSE_NATIVE_DATAVIEWCTRL build option
It defaults to 1, but can be set to 0 to force using the generic version
of the control even under GTK or Mac, where the native version is used
by default.

This can, unfortunately, be useful to work around various but multiple
native control limitations.
2019-12-15 16:23:47 +01:00
Vadim Zeitlin
29db4e7d83 Remove extraneous parenthesis in --without-libjbig help message
No real changes, this is purely cosmetic.
2019-11-17 23:50:54 +01:00
Vadim Zeitlin
91dc325ca9 Don't disable wxGraphicsContext if Cairo not available under Mac
This breaks Mac build by default and shouldn't be done. In fact, Cairo
should be used only optionally under MSW and Mac, where it's not always
needed, so add a new configure option to request it.
2019-11-17 23:49:21 +01:00
Artur Wieczorek
3ca6e04d61 Allow building library with Cairo under wxOSX
Enable checking for Cairo in the configure script.
2019-11-17 22:14:38 +01:00
Vadim Zeitlin
db846f15ab Disable wxMediaCtrl and wxWebView when OLE is disabled in wxMSW
Avoid errors in wx/msw/chkconf.h during compilation by proactively
turning these options off in configure if wxUSE_OLE==0.
2019-11-15 17:09:43 +01:00
Vadim Zeitlin
37d8b6018c Remove test for ole2.h from configure
This is unnecessary, this header should always be available, so it was a
waste of time to check for it at best and, actually, this broke the
Cygwin build under AppVeyor as configure didn't find the header somehow,
even if compiling the code using it works perfectly well.
2019-11-15 17:06:17 +01:00
Vadim Zeitlin
02314de0ee Suppress spurious "unsupported DPI awareness" configure messages
If --with-dpi option is not specified at all, wxWITH_DPI_MANIFEST
remains empty, so take this value into account explicitly.
2019-11-01 15:39:52 +01:00