CONFIGURE: Improve detection of SDL and SDL_net
This commit is contained in:
parent
3d469682fc
commit
24057754ad
1 changed files with 65 additions and 45 deletions
54
configure
vendored
54
configure
vendored
|
@ -134,6 +134,7 @@ done
|
||||||
# Default settings
|
# Default settings
|
||||||
#
|
#
|
||||||
# Default lib behavior yes/no/auto
|
# Default lib behavior yes/no/auto
|
||||||
|
_sdl=no
|
||||||
_ogg=auto
|
_ogg=auto
|
||||||
_vorbis=auto
|
_vorbis=auto
|
||||||
_sdlnet=auto
|
_sdlnet=auto
|
||||||
|
@ -3456,6 +3457,7 @@ case $_backend in
|
||||||
append_var INCLUDES "-isystem $ANDROID_NDK/sources/cxx-stl/system/include"
|
append_var INCLUDES "-isystem $ANDROID_NDK/sources/cxx-stl/system/include"
|
||||||
;;
|
;;
|
||||||
androidsdl)
|
androidsdl)
|
||||||
|
_sdl=auto
|
||||||
;;
|
;;
|
||||||
dc)
|
dc)
|
||||||
append_var INCLUDES '-I$(srcdir)/backends/platform/dc'
|
append_var INCLUDES '-I$(srcdir)/backends/platform/dc'
|
||||||
|
@ -3475,6 +3477,7 @@ case $_backend in
|
||||||
;;
|
;;
|
||||||
dingux)
|
dingux)
|
||||||
append_var DEFINES "-DDINGUX"
|
append_var DEFINES "-DDINGUX"
|
||||||
|
_sdl=auto
|
||||||
;;
|
;;
|
||||||
ds)
|
ds)
|
||||||
append_var INCLUDES '-I$(srcdir)/backends/platform/ds/arm9/source'
|
append_var INCLUDES '-I$(srcdir)/backends/platform/ds/arm9/source'
|
||||||
|
@ -3489,6 +3492,7 @@ case $_backend in
|
||||||
if test "$_debug_build" = yes; then
|
if test "$_debug_build" = yes; then
|
||||||
append_var DEFINES "-DGPH_DEBUG"
|
append_var DEFINES "-DGPH_DEBUG"
|
||||||
fi
|
fi
|
||||||
|
_sdl=auto
|
||||||
;;
|
;;
|
||||||
iphone)
|
iphone)
|
||||||
append_var LIBS "-lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES"
|
append_var LIBS "-lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES"
|
||||||
|
@ -3510,9 +3514,11 @@ case $_backend in
|
||||||
;;
|
;;
|
||||||
linuxmoto)
|
linuxmoto)
|
||||||
append_var DEFINES "-DLINUXMOTO"
|
append_var DEFINES "-DLINUXMOTO"
|
||||||
|
_sdl=auto
|
||||||
;;
|
;;
|
||||||
maemo)
|
maemo)
|
||||||
append_var DEFINES "-DMAEMO"
|
append_var DEFINES "-DMAEMO"
|
||||||
|
_sdl=auto
|
||||||
;;
|
;;
|
||||||
n64)
|
n64)
|
||||||
append_var INCLUDES '-I$(N64SDK)/include'
|
append_var INCLUDES '-I$(N64SDK)/include'
|
||||||
|
@ -3526,6 +3532,7 @@ case $_backend in
|
||||||
append_var DEFINES "-DUSE_NULL_DRIVER"
|
append_var DEFINES "-DUSE_NULL_DRIVER"
|
||||||
;;
|
;;
|
||||||
openpandora)
|
openpandora)
|
||||||
|
_sdl=auto
|
||||||
;;
|
;;
|
||||||
ps2)
|
ps2)
|
||||||
append_var DEFINES "-D_EE"
|
append_var DEFINES "-D_EE"
|
||||||
|
@ -3561,9 +3568,8 @@ case $_backend in
|
||||||
append_var LIBS "-lSceAudio_stub -lSceCtrl_stub -lScePower_stub"
|
append_var LIBS "-lSceAudio_stub -lSceCtrl_stub -lScePower_stub"
|
||||||
append_var LIBS "-lSceNet_stub -lSceNetCtl_stub -lSceAppMgr_stub -lScePgf_stub"
|
append_var LIBS "-lSceNet_stub -lSceNetCtl_stub -lSceAppMgr_stub -lScePgf_stub"
|
||||||
append_var LIBS "-lSceTouch_stub -lSceHid_stub"
|
append_var LIBS "-lSceTouch_stub -lSceHid_stub"
|
||||||
append_var DEFINES "-DSDL_BACKEND"
|
_sdl=yes
|
||||||
add_line_to_config_mk "SDL_BACKEND = 1"
|
_sdlversion=2.0.0
|
||||||
add_line_to_config_mk "USE_SDL2 = 1"
|
|
||||||
append_var MODULES "backends/platform/sdl"
|
append_var MODULES "backends/platform/sdl"
|
||||||
append_var INCLUDES "-I$VITASDK/arm-vita-eabi/include/SDL2"
|
append_var INCLUDES "-I$VITASDK/arm-vita-eabi/include/SDL2"
|
||||||
;;
|
;;
|
||||||
|
@ -3571,8 +3577,10 @@ case $_backend in
|
||||||
append_var DEFINES "-DSAMSUNGTV"
|
append_var DEFINES "-DSAMSUNGTV"
|
||||||
append_var LDFLAGS "-shared"
|
append_var LDFLAGS "-shared"
|
||||||
append_var LDFLAGS "-fpic"
|
append_var LDFLAGS "-fpic"
|
||||||
|
_sdl=auto
|
||||||
;;
|
;;
|
||||||
sdl)
|
sdl)
|
||||||
|
_sdl=auto
|
||||||
;;
|
;;
|
||||||
tizen)
|
tizen)
|
||||||
# dirent.h not available. NONSTANDARD_PORT==ensure portdefs.h is included
|
# dirent.h not available. NONSTANDARD_PORT==ensure portdefs.h is included
|
||||||
|
@ -3598,9 +3606,9 @@ case $_backend in
|
||||||
# The PDL library acts as the WebOS device toolchain, and is required to control the virtual keyboard among other OS-level events.
|
# The PDL library acts as the WebOS device toolchain, and is required to control the virtual keyboard among other OS-level events.
|
||||||
append_var LIBS "-lSDL -lpdl"
|
append_var LIBS "-lSDL -lpdl"
|
||||||
append_var DEFINES "-DWEBOS"
|
append_var DEFINES "-DWEBOS"
|
||||||
append_var DEFINES "-DSDL_BACKEND"
|
|
||||||
add_line_to_config_mk "SDL_BACKEND = 1"
|
|
||||||
append_var MODULES "backends/platform/sdl"
|
append_var MODULES "backends/platform/sdl"
|
||||||
|
_sdl=yes
|
||||||
|
_sdlversion=1.2.0
|
||||||
;;
|
;;
|
||||||
wii)
|
wii)
|
||||||
append_var DEFINES "-D__WII__"
|
append_var DEFINES "-D__WII__"
|
||||||
|
@ -3619,8 +3627,8 @@ case $_backend in
|
||||||
append_var INCLUDES '-I$(srcdir)/backends/platform/wince/CEgui'
|
append_var INCLUDES '-I$(srcdir)/backends/platform/wince/CEgui'
|
||||||
append_var INCLUDES '-I$(srcdir)/backends/platform/wince/CEkeys'
|
append_var INCLUDES '-I$(srcdir)/backends/platform/wince/CEkeys'
|
||||||
append_var LIBS "-static -lSDL"
|
append_var LIBS "-static -lSDL"
|
||||||
append_var DEFINES "-DSDL_BACKEND"
|
_sdl=yes
|
||||||
add_line_to_config_mk "SDL_BACKEND = 1"
|
_sdlversion=1.2.0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "support for $_backend backend not implemented in configure script yet"
|
echo "support for $_backend backend not implemented in configure script yet"
|
||||||
|
@ -3632,19 +3640,33 @@ append_var MODULES "backends/platform/$_backend"
|
||||||
#
|
#
|
||||||
# Setup SDL specifics for SDL based backends
|
# Setup SDL specifics for SDL based backends
|
||||||
#
|
#
|
||||||
case $_backend in
|
if test "$_sdl" = auto ; then
|
||||||
androidsdl | dingux | gph | linuxmoto | maemo | openpandora | samsungtv | sdl)
|
|
||||||
find_sdlconfig
|
find_sdlconfig
|
||||||
append_var INCLUDES "`$_sdlconfig --prefix="$_sdlpath" --cflags`"
|
append_var SDL_CFLAGS "`$_sdlconfig --prefix="$_sdlpath" --cflags`"
|
||||||
if test "$_static_build" = yes ; then
|
if test "$_static_build" = yes ; then
|
||||||
append_var LIBS "`$_sdlconfig --prefix="$_sdlpath" --static-libs`"
|
append_var SDL_LIBS "`$_sdlconfig --prefix="$_sdlpath" --static-libs`"
|
||||||
else
|
else
|
||||||
append_var LIBS "`$_sdlconfig --prefix="$_sdlpath" --libs`"
|
append_var SDL_LIBS "`$_sdlconfig --prefix="$_sdlpath" --libs`"
|
||||||
fi
|
fi
|
||||||
|
_sdlversion=`$_sdlconfig --version`
|
||||||
|
|
||||||
|
echocheck "SDL"
|
||||||
|
_sdl=no
|
||||||
|
cat > $TMPC << EOF
|
||||||
|
#include "SDL.h"
|
||||||
|
int main(int argc, char *argv[]) { SDL_Init(0); return 0; }
|
||||||
|
EOF
|
||||||
|
cc_check $LIBS $SDL_LIBS $INCLUDES $SDL_CFLAGS && _sdl=yes
|
||||||
|
echo "$_sdl"
|
||||||
|
if test "$_sdl" = no ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$_sdl" = yes ; then
|
||||||
append_var DEFINES "-DSDL_BACKEND"
|
append_var DEFINES "-DSDL_BACKEND"
|
||||||
add_line_to_config_mk "SDL_BACKEND = 1"
|
add_line_to_config_mk "SDL_BACKEND = 1"
|
||||||
|
append_var INCLUDES "$SDL_CFLAGS"
|
||||||
_sdlversion=`$_sdlconfig --version`
|
append_var LIBS "$SDL_LIBS"
|
||||||
case $_sdlversion in
|
case $_sdlversion in
|
||||||
2.0.*)
|
2.0.*)
|
||||||
add_line_to_config_mk "USE_SDL2 = 1"
|
add_line_to_config_mk "USE_SDL2 = 1"
|
||||||
|
@ -3672,9 +3694,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
define_in_config_if_yes "$_sdlnet" 'USE_SDL_NET'
|
define_in_config_if_yes "$_sdlnet" 'USE_SDL_NET'
|
||||||
echo "$_sdlnet"
|
echo "$_sdlnet"
|
||||||
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue