diff options
author | vanfanel | 2015-12-04 15:57:06 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-12-08 21:41:40 +0100 |
commit | 8981279580ea97a0456d6b4ac4c0cc5095861912 (patch) | |
tree | fe8169627245ba7d8960cae4fb0d97c932e1c390 | |
parent | 1eecc41ef65300fb849e42110a2463fa2b3ce376 (diff) | |
download | scummvm-rg350-8981279580ea97a0456d6b4ac4c0cc5095861912.tar.gz scummvm-rg350-8981279580ea97a0456d6b4ac4c0cc5095861912.tar.bz2 scummvm-rg350-8981279580ea97a0456d6b4ac4c0cc5095861912.zip |
CONFIGURE: Fix OpenGL ES detection for Raspberry Pi and other SBCs.
-rwxr-xr-x | configure | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -2573,9 +2573,9 @@ if test -n "$_host"; then raspberrypi) # This is needed because the official cross compiler doesn't have multiarch enabled # but Raspbian does. - # Be careful as it's the linker (LDFLAGS) which must know about sysroot. - # These are needed to build against Raspbian's libSDL even if we don't activate - # dispmanx support. + # Be careful as it's the linker (LDFLAGS) which must know about sysroot. + # These are needed to build against Raspbian's libSDL even if we don't activate + # dispmanx support. append_var LDFLAGS "--sysroot=$RPI_ROOT" append_var LDFLAGS "-B$RPI_ROOT/usr/lib/arm-linux-gnueabihf" append_var LDFLAGS "-Xlinker --rpath-link=$RPI_ROOT/usr/lib/arm-linux-gnueabihf" @@ -2583,13 +2583,17 @@ if test -n "$_host"; then append_var LDFLAGS "-Xlinker --rpath-link=$RPI_ROOT/opt/vc/lib" append_var LDFLAGS "-L$RPI_ROOT/opt/vc/lib" append_var LDFLAGS "-L/opt/rpi_root/lib/arm-linux-gnueabihf -L$RPI_ROOT/usr/lib -L$RPI_ROOT/opt/vc/lib -lbcm_host -lvcos" + # This is so optional OpenGL ES includes are found. + append_var CXXFLAGS "-I$RPI_ROOT/opt/vc/include" _savegame_timestamp=no _eventrec=no _build_scalers=no _build_hq_scalers=no - # It makes no sense to have both GL and dispmanx rendering support. - _opengl=no - _opengles=no + # This is so OpenGL detection works for OpenGL ES, only if OpenGL has been + # explicitly activated. + if test "$_opengl" = yes; then + _opengles=yes + fi ;; dreamcast) append_var DEFINES "-DDISABLE_DEFAULT_SAVEFILEMANAGER" @@ -4037,6 +4041,13 @@ EOF int main(void) { return GL_OES_VERSION_1_1; } EOF cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && _opengles=yes && break + + # Test the current header for OpenGL ES on SBCs (Raspberry Pi, Cubieboard, etc) + cat > $TMPC << EOF +#include <$i> +int main(void) { return GL_VERSION_ES_CM_1_1; } +EOF + cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && _opengles=yes && break done fi fi |