[Scummvm-cvs-logs] SF.net SVN: scummvm:[54536] scummvm/trunk/configure

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Nov 28 18:42:05 CET 2010


Revision: 54536
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54536&view=rev
Author:   fingolfin
Date:     2010-11-28 17:42:05 +0000 (Sun, 28 Nov 2010)

Log Message:
-----------
BUILD: Add OpenGL support to configure (from branch)

Modified Paths:
--------------
    scummvm/trunk/configure

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2010-11-28 17:41:33 UTC (rev 54535)
+++ scummvm/trunk/configure	2010-11-28 17:42:05 UTC (rev 54536)
@@ -132,6 +132,7 @@
 _theoradec=auto
 _fluidsynth=auto
 _16bit=auto
+_opengl=auto
 _readline=auto
 # Default option behaviour yes/no
 _debug_build=auto
@@ -710,6 +711,7 @@
   --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 @@
   --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 @@
 	--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 @@
 		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 "$_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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list