diff options
-rwxr-xr-x | configure | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -72,6 +72,27 @@ eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_c } # +# Determine sdl-config +# +# TODO: small bit of code to test sdl useability +find_sdlconfig() +{ +printf "Looking for sdl-config... " +sdlconfigs="$_sdlconfig sdl-config sdl11-config sdl12-config" +CXX= +for sdlconfig in $sdlconfigs; do + if test "-e $sdlconfig" ; then + _sdlconfig=$sdlconfig + echo $_sdlconfig + break + else + echo "none found!" + exit 1 + fi +done +} + +# # Determine a data type with the given length # find_type_with_size () @@ -428,19 +449,20 @@ echo echo -n "Backend... " echo "$_backend" -echo # # Backend related stuff # case $_backend in sdl) + find_sdlconfig INCLUDES="$INCLUDES `$_sdlconfig --cflags`" LIBS="$LIBS `$_sdlconfig --libs`" OBJS="$OBJS backends/sdl/sdl-common.o backends/sdl/sdl.o" MODULES="$MODULES backends/sdl" ;; sdlgl) + find_sdlconfig INCLUDES="$INCLUDES `$_sdlconfig --cflags`" LIBS="$LIBS `$_sdlconfig --libs` -lGL" OBJS="$OBJS backends/sdl/sdl-common.o backends/sdl/sdl_gl.o" @@ -460,6 +482,7 @@ case $_backend in ;; esac +echo echo "Creating config.h" cat > config.h << EOF /* This file is automatically generated by configure */ |