This is a potential security issue.
The problem is that config.h and config.mk are populated with
all variables prefixed with 'HAVE_' from the user's environment.
Example:
$ HAVE_FOO=yes ./configure
$ grep FOO config.mk
HAVE_FOO = 1
$ grep FOO config.h
#define HAVE_FOO 1
After this commit these files will only use variables set by
qb configure process and not from the user's environment. This
issue could result in hard to diagnose undefined behavior or
maybe worse?
The user should experience no change in behavior, but
developers should be more careful about setting 'HAVE_'
variables manually.
Unless the FOO variable is used by check_enabled ($2 only),
check_platform, check_lib, check_pkgconf, check_header,
check_macro or check_switch functions it should be set at
least once by the new add_opt function. The first argument
should be 'FOO' which matches the HAVE_FOO variable and the
second argument should contain 'auto', 'no' or 'yes'.
Example:
add_opt FOO yes
When in doubt its safe to use add_opt. This will also fix a
few potential issues where configure arguments used by the
user are ignored.
When the second argument is not set the FOO variable will only
be used to populate config.h and config.mk with its current
value. This should only be done in qb/qb.libs.sh in functions
that set 'HAVE_' variables.
This extends the check_enabled function to be able to check more than
one feature. In the case of RPNG it depends on either the builtin or
system zlib, but if the system zlib was not available while the builtin
zlib was it would still be disabled erroneously.
Now it will only be disabled if both the system and builtin zlib are
disabled.
Some systems may have egl libraries, but not egl headers which
will result in failing to build EGL support.
Also OpenGLES2 also required EGL support so lets make that clear.
This allows enabling and disabling features for platforms
more robustly.
Fixes https://github.com/libretro/RetroArch/issues/8777
v2: Fix D3D configure checks.
v3: Cleanup.
v4: Update Makefile.msvc and Makefile.win
This is the correct change to prefer the builtin zlib.
Revert "(QB) Bake in zlib by default, make zlib as dynamic library dependency"
This reverts commit 2713e792ca.
Revert "(QB) Change behavior - if HAVE_ZLIB = no, that doesn't mean"
This reverts commit f66fe5e16b.
HAVE_BUILTINZLIB will also be set to no implicitly. It will still
try to use the baked in zlib. If you want to build without any zlib
support entirely, you now need to do this -
./configure --disable-zlib --disable-builtinzlib
* qb: Fix OpenGLES build.
The gl core video driver requires at least OpenGLES 3 and
OpenGL 1 is not compatible with OpenGLES 2 or 3.
* travis: Test OpenGLES builds on linux.
Menu widgets must also be disabled with --disable-menu, now
configure will do so or error if --disable-menu and
--enable-menu_widgets are explicitly used.