Fixed header for OS X, and added OpenGL feature to configure script. (Patch by clone2727)
svn-id: r50908
This commit is contained in:
parent
25f1980dad
commit
fc8b60abda
2 changed files with 49 additions and 3 deletions
|
@ -37,7 +37,9 @@
|
|||
#undef ARRAYSIZE
|
||||
#endif
|
||||
|
||||
#ifdef USE_GLES
|
||||
#ifdef MACOSX
|
||||
#include <gl.h>
|
||||
#elif defined(USE_GLES)
|
||||
#include <GLES/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
|
|
48
configure
vendored
48
configure
vendored
|
@ -123,6 +123,7 @@ _zlib=auto
|
|||
_mpeg2=no
|
||||
_fluidsynth=auto
|
||||
_16bit=auto
|
||||
_opengl=auto
|
||||
_readline=auto
|
||||
# Default option behaviour yes/no
|
||||
_debug_build=auto
|
||||
|
@ -676,6 +677,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
|
||||
|
@ -705,6 +707,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)
|
||||
|
@ -758,6 +763,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 ;;
|
||||
|
@ -821,6 +828,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`
|
||||
;;
|
||||
|
@ -1345,8 +1357,10 @@ case $_host_os in
|
|||
;;
|
||||
darwin*)
|
||||
DEFINES="$DEFINES -DUNIX -DMACOSX"
|
||||
CXXFLAGS="$CXXFLAGS -I/System/Library/Frameworks/OpenGL.framework/Headers"
|
||||
LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI -framework OpenGL"
|
||||
CXXFLAGS="$CXXFLAGS"
|
||||
LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI"
|
||||
OPENGL_CFLAGS="-I/System/Library/Frameworks/OpenGL.framework/Headers"
|
||||
OPENGL_LIBS="-framework OpenGL"
|
||||
add_line_to_config_mk 'MACOSX = 1'
|
||||
;;
|
||||
dreamcast)
|
||||
|
@ -1440,6 +1454,14 @@ case $_host_os in
|
|||
;;
|
||||
esac
|
||||
|
||||
# HACK: On non-OSX systems, add the GL library
|
||||
case $_host_os in
|
||||
*darwin*)
|
||||
;;
|
||||
*)
|
||||
OPENGL_LIBS="$OPENGL_LIBS -lGL"
|
||||
esac
|
||||
|
||||
if test -n "$_host"; then
|
||||
# Cross-compiling mode - add your target here if needed
|
||||
echo "Cross-compiling to $_host"
|
||||
|
@ -2261,6 +2283,28 @@ else
|
|||
_def_text_console='#undef USE_TEXT_CONSOLE'
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for OpenGL (ES)
|
||||
#
|
||||
echocheck "OpenGL (ES)"
|
||||
if test "$_opengl" = auto ; then
|
||||
# TODO: This is just a quick hack until actual detection is added, which
|
||||
# will be a pain because of the various directories that OpenGL can have
|
||||
# its headers in. Maybe we should force the platforms to automatically
|
||||
# include the directory that includes gl.h?
|
||||
_opengl=yes
|
||||
fi
|
||||
if test "$_opengl" = yes ; then
|
||||
_def_opengl='#define USE_OPENGL'
|
||||
LIBS="$LIBS $OPENGL_LIBS"
|
||||
INCLUDES="$INCLUDES $OPENGL_CFLAGS"
|
||||
DEFINES="$DEFINES -DUSE_OPENGL"
|
||||
else
|
||||
_def_opengl='#undef USE_OPENGL'
|
||||
fi
|
||||
|
||||
echo "$_opengl"
|
||||
|
||||
#
|
||||
# Check for nasm
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue