aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure60
1 files changed, 60 insertions, 0 deletions
diff --git a/configure b/configure
index db01465db0..3f22dbdf4d 100755
--- a/configure
+++ b/configure
@@ -124,6 +124,7 @@ _zlib=auto
_mpeg2=no
_fluidsynth=auto
_16bit=auto
+_opengl=auto
_readline=auto
# Default option behaviour yes/no
_debug_build=auto
@@ -695,6 +696,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
@@ -724,6 +726,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-fluidsynth-prefix=DIR Prefix where libfluidsynth is installed (optional)
@@ -779,6 +784,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 ;;
@@ -842,6 +849,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`
;;
@@ -1385,6 +1397,7 @@ case $_host_os in
;;
darwin*)
DEFINES="$DEFINES -DMACOSX"
+ CXXFLAGS="$CXXFLAGS"
LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI"
add_line_to_config_mk 'MACOSX = 1'
_unix=yes
@@ -1440,6 +1453,7 @@ case $_host_os in
DEFINES="$DEFINES -DWIN32 -D__USE_MINGW_ANSI_STDIO=0"
LIBS="$LIBS -lmingw32 -lwinmm"
OBJS="$OBJS scummvmico.o"
+ add_line_to_config_mk 'WIN32 = 1'
;;
mint*)
DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE"
@@ -2319,6 +2333,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
@@ -2821,3 +2880,4 @@ include \$(srcdir)/Makefile
EOF
fi
+