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.
This driver should sunset the old gl2 driver, but that driver will
likely live on to support really ancient and terrible GL stacks.
All the worst legacy cruft has been ripped out, and it's almost a decent
backend now.
Requirements for slang are GL 3.2+ or GLES3.
Some shaders require features which are not directly compatible with
GLES2 or legacy GL.
This driver shares a lot of concepts from the Vulkan driver.
The slang shader stack and SPIRV-Cross are used to implement the shader
spec, and the menu shaders are also shared with Vulkan.
This fixes issues where if both check_header and check_lib are used
it would set HAVE_FOO=yes and then result in a configure failure
when check_lib failed. This was also implemented for the other functions
to avoid similar issues.
* travis: Enable building qt for linux.
* qb: Set QT_SELECT for moc and qtchooser.
This should have no effect on systems where qtchooser is not used.
Fixes https://github.com/libretro/RetroArch/issues/8028
* qb: Actually disable c++ features if there is no c++ compiler.
Now this warning actually does something.
Warning: A working C++ compiler was not found, C++ features will be disabled.
This moves the check for a Qt5 moc into its own file, qb.moc.sh which
is executed at the end of the script to avoid the direct dependency on
pkg-config. Now instead it depends on the QT5CORE_CFLAGS and
QT5CORE_LIBS variables set in config.lib.sh. These should always be set
if HAVE_QT=yes.
This also creates a new qb.make.sh file to ensure that the config.mk and
config.h files are created at the end of the configure script.
This adds '--disable-menu' which will disable all of the menu drivers
including Qt. This will also allow disabling only rgui and not the other
menu drivers.
Fixes:
retroarch.c: In function ‘runloop_check_state’:
retroarch.c:2593:20: warning: variable ‘seq’ set but not used [-Wunused-but-set-variable]
static uint64_t seq = 0;
^~~
Also fixes a crash on startup with '--disable-rgui'.
Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x0000000000529f52 in strlcpy_retro__ (dest=0x7fffffffbb17 "treaming_toggle",
source=0x1 <error: Cannot access memory at address 0x1>, size=250)
at libretro-common/compat/compat_strl.c:38
38 while (--n && (*dest++ = *source++)) src_size++;
(gdb) bt
dest=0x7fffffffbb17 "treaming_toggle",
source=0x1 <error: Cannot access memory at address 0x1>, size=250)
at libretro-common/compat/compat_strl.c:38
size=250) at libretro-common/compat/compat_strl.c:60
out_path=0x7fffffffbb10 "input_", dir=0x94b460 "input", path=0x0,
delim=95 '_', size=256) at libretro-common/file/file_path.c:964
prefix=0x94b460 "input", btn=0x0, bind=0x151e180 <input_autoconf_binds+4672>)
at input/input_driver.c:2483
binds=0x151cf40 <input_autoconf_binds>) at tasks/task_autodetect.c:172
params=0x26adb40, task=0x26b74f0) at tasks/task_autodetect.c:252
params=0x26adb40, task=0x26b74f0) at tasks/task_autodetect.c:393
at tasks/task_autodetect.c:851
at libretro-common/queues/task_queue.c:182
at libretro-common/queues/task_queue.c:609
at frontend/frontend.c:146
at frontend/frontend.c:170
Fixes https://github.com/libretro/RetroArch/issues/7893
This fixes a few subtle problems with passing CFLAGS and CXXFLAGS as
environment variables for configure.
First it will now only add these variables to config.mk when they are
actually set. If they are unset then the default optimizations in the
Makefile are set. This avoids passing more than one conflicting
optimization level to the compiler.
Next all CFLAGS are added to CXXFLAGS to avoid issues with forgetting to
set both CFLAGS and CXXFLAGS. This results in the cxx compiler getting
passed several redundant optimization levels when both the CFLAGS and
CXXFLAGS environment variabls are used. Now these uses of CFLAGS in
Makefile.common are set to DEF_FLAGS. This allows adding $(DEF_FLAGS)
to the CXXFLAGS variable without adding redundant flags from CFLAGS.
v2: Update other build files.
Currently RetroArch will install assets for xmb, materialui and ozone
unconditionally.
This change will now only install assets when RetroArch is compiled
with support for the relevant menu driver. This also exposes assets
from the nuklear and zarch menu drivers which are still disabled by
default.
This uses safer quoting and removes an unneeded use of printf.
Fixes the following shellcheck warning.
In qb/qb.libs.sh line 143:
if [ $3 ]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
v2: Remove redundant conditional.
C89 builds are only used for the qb build system currently and these are
already checked in qb/config.params.sh.
Additionally the HAVE_NETWORKING check is handled with qb/config.lib.sh
where HAVE_SSL and HAVE_BUILTINMBEDTLS are disabled if networking is
also disabled. The other build systems should never define HAVE_SSL or
HAVE_BUILTINMBEDTLS without HAVE_NETWORKING. Also there are no other
build systems that rely on Makefile.common using this yet.
This does the following.
1. Fixes checking if the CXX compiler works on platforms other than windows.
2. Turns the error when the CXX compiler is missing or doesn't work into a warning.
3. Adds HAVE_CC and HAVE_CXX.
4. Only adds CC and CXX to config.mk when HAVE_CC or HAVE_CXX are true.
5. Disables Qt companion, Vulkan, CXX_BUILD and NEED_CXX_LINKER if HAVE_CXX is false.
6. Explicitly errors when the CXX compiler is broken or missing and Qt or vulkan support is enabled.
7. No longer explicitly links with the CXX compiler on windows since this should no longer be needed.
This also adds the function `check_enabled` to `qb/qb.lib.sh` which
can be used to dynamically disable any libraries that require C++
support.
By default 'make install' will now install the following 2-3 files
to $(DESTDIR)$(SHARE_DIR)/doc/retroarch which by default is
/usr/local/share/doc/retroarch.
COPYING
README.md
and if media/assets exists it will install:
media/assets/COPYING to COPYING.assets
Users will be able to configure this install path with.
./configure --docdir=PATH
For example:
./configure --docdir=/usr/doc/RetroArch-1.7.0
This allows a user to use --datarootdir=PATH to configure the
share directory used for pixmaps, desktop files, man pages and assets.
By default this will be '/usr/local/share'. Assets and man page install
paths can still be configured with:
--with-man_dir=PATH
and
--with-assets_dir=PATH
Some operating systems like Haiku use unconventional install paths
and this should allow them to configure their build correctly.
Haiku really should use the configure flags provided, that is why they exists.
In this case.
./configure \
--global-config-dir=$PREFIX/settings
--with-assets_dir=$PREFIX/data
--with-mand_dir=$PREFIX/documentation/man
Changing the defaults just makes the script more complicated for no good reason.
The check_lib function does not seem able to detect vulkan on windows,
this replaces a hack in Makefile.common that does the same, but while allowing
C89_BUILD=1 and --disable-vulkan to work.
LD retroarch
obj-unix/./libretro-common/net/net_natt.o: In function `natt_open_port':
/RetroArch/libretro-common/net/net_natt.c:120: undefined reference to `UPNP_AddAnyPortMapping'
/RetroArch/libretro-common/net/net_natt.c:133: undefined reference to `UPNP_GetExternalIPAddress'
/RetroArch/libretro-common/net/net_natt.c:126: undefined reference to `UPNP_AddPortMapping'
obj-unix/./libretro-common/net/net_natt.o: In function `natt_init':
/RetroArch/libretro-common/net/net_natt.c:61: undefined reference to `upnpDiscover'
/RetroArch/libretro-common/net/net_natt.c:74: undefined reference to `miniwget'
/RetroArch/libretro-common/net/net_natt.c:77: undefined reference to `parserootdesc'
/RetroArch/libretro-common/net/net_natt.c:79: undefined reference to `GetUPNPUrls'
/RetroArch/libretro-common/net/net_natt.c:81: undefined reference to `freeUPNPDevlist'
collect2: error: ld returned 1 exit status
make: *** [Makefile:159: retroarch] Error 1
This is a proof of concept for the fallback path without pkg-config.
As jack is something often not installed by default it demonstrates
that when pkg-config exists and the dependency doesn't the check_val
function in qb/qb.libs.sh will redundantly check -ljack and as expected,
fail. It also shows that when pkg-config is not installed and jack is
enabled with --enable-jack it will bail and print a configure error.
This accomplishes two things for the fallback path without pkg-config.
1. If --disable-foo is passed to configure it will explicitly skip
check_val. This has the benefit of reducing checks in
qb/config.libs.sh which are easy to break due to human error.
2. When a fallback path exists and --enable-foo is passed to configure,
but fails due to the missing -lfoo check_val will now bail and print
a configure error. However --enable-foo will still be ignored if
there is no fallback path and pkg-config is not installed.
One issue with this is that if pkg-config is installed and the package
foo is not, it will still check if -lfoo works. As not all pkg-config
implemenations can be trusted to work even if they exist this seems
unavoidable.