aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-11-28 17:42:05 +0000
committerMax Horn2010-11-28 17:42:05 +0000
commit7870bed92f943650ce5d1e9bfddf6dbc5d644374 (patch)
tree8a810ac9f385579aea5e2083c45e89ce3b58af78
parentaa33b22d638c21e51814658c0b1034727a42ef4e (diff)
downloadscummvm-rg350-7870bed92f943650ce5d1e9bfddf6dbc5d644374.tar.gz
scummvm-rg350-7870bed92f943650ce5d1e9bfddf6dbc5d644374.tar.bz2
scummvm-rg350-7870bed92f943650ce5d1e9bfddf6dbc5d644374.zip
BUILD: Add OpenGL support to configure (from branch)
svn-id: r54536
-rwxr-xr-xconfigure57
1 files changed, 57 insertions, 0 deletions
diff --git a/configure b/configure
index c4e1bbd6dd..44e9e2d5f0 100755
--- a/configure
+++ b/configure
@@ -132,6 +132,7 @@ _png=auto
_theoradec=auto
_fluidsynth=auto
_16bit=auto
+_opengl=auto
_readline=auto
# Default option behaviour yes/no
_debug_build=auto
@@ -710,6 +711,7 @@ Optional Features:
--default-dynamic make plugins dynamic by default
--disable-mt32emu don't enable the integrated MT-32 emulator
--disable-16bit don't enable 16bit color support
+ --disable-opengl don't enable OpenGL (ES)
--disable-scalers exclude scalers
--disable-hq-scalers exclude HQ2x and HQ3x scalers
--disable-translation don't build support for translated messages
@@ -740,6 +742,9 @@ Optional Libraries:
--with-mpeg2-prefix=DIR Prefix where libmpeg2 is installed (optional)
--enable-mpeg2 enable mpeg2 codec for cutscenes [no]
+ --with-opengl-prefix=DIR Prefix where OpenGL (ES) is installed (optional)
+ --disable-opengl disable OpenGL (ES) support [autodetect]
+
--disable-indeo3 disable Indeo3 decoder [autodetect]
--with-png-prefix=DIR Prefix where libpng is installed (optional)
@@ -809,6 +814,8 @@ for ac_option in $@; do
--disable-fluidsynth) _fluidsynth=no ;;
--enable-readline) _readline=yes ;;
--disable-readline) _readline=no ;;
+ --enable-opengl) _opengl=yes ;;
+ --disable-opengl) _opengl=no ;;
--enable-verbose-build) _verbose_build=yes ;;
--enable-plugins) _dynamic_modules=yes ;;
--default-dynamic) _plugins_default=dynamic ;;
@@ -882,6 +889,11 @@ for ac_option in $@; do
READLINE_CFLAGS="-I$arg/include"
READLINE_LIBS="-L$arg/lib"
;;
+ --with-opengl-prefix=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ OPENGL_CFLAGS="-I$arg/include"
+ OPENGL_LIBS="-L$arg/lib"
+ ;;
--backend=*)
_backend=`echo $ac_option | cut -d '=' -f 2`
;;
@@ -2628,6 +2640,51 @@ define_in_config_h_if_yes "$_readline" 'USE_READLINE'
define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE'
#
+# Check for OpenGL (ES)
+#
+
+echocheck "OpenGL (ES)"
+if test "$_opengl" = auto ; then
+ _opengl=no
+ if test "$_backend" = "sdl" ; then
+ case $_host_os in
+ *darwin*)
+ _opengl=yes
+ ;;
+ *mingw*)
+ _opengl=yes
+ ;;
+ *)
+ cat > $TMPC << EOF
+#include <GL/gl.h>
+int main(void) { return GL_VERSION_1_1; }
+EOF
+ cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS -lGL && _opengl=yes
+ esac
+ fi
+fi
+if test "$_opengl" = yes ; then
+ LIBS="$LIBS $OPENGL_LIBS"
+ INCLUDES="$INCLUDES $OPENGL_CFLAGS"
+ DEFINES="$DEFINES -DUSE_OPENGL"
+ case $_host_os in
+ *darwin*)
+ INCLUDES="$INCLUDES -I/System/Library/Frameworks/OpenGL.framework/Headers"
+ LIBS="$LIBS -framework OpenGL"
+ ;;
+ *mingw*)
+ LIBS="$LIBS -lopengl32"
+ ;;
+ *)
+ LIBS="$LIBS -lGL"
+ esac
+fi
+
+echo "$_opengl"
+
+add_to_config_mk_if_yes "$_opengl" 'USE_OPENGL=1'
+
+#
# Check for nasm
#
if test "$_have_x86" = yes ; then