Update build system to check for minimum SDL version.

This commit is contained in:
Themaister 2011-01-06 20:29:04 +01:00
parent 948de95799
commit d37bd214e6
2 changed files with 5 additions and 4 deletions

View File

@ -16,7 +16,7 @@ check_lib RSOUND -lrsound rsd_init
check_lib ROAR -lroar roar_vs_new
check_lib JACK -ljack jack_client_open
check_pkgconf SDL sdl
check_pkgconf SDL sdl 1.2.10
check_critical SDL "Cannot find SDL library."
check_lib CG -lCg cgCreateContext

View File

@ -106,14 +106,15 @@ check_pkgconf()
eval tmpval=\$$tmpval
[ "$tmpval" = "no" ] && return 0
echo -n "Checking presence of package $2 ... "
echo -n "Checking presence of package $2"
eval HAVE_$1=no
eval $1_CFLAGS=""
eval $1_LIBS=""
answer=no
minver=0.0
[ ! -z $3 ] && minver=$3
pkg-config --atleast-version=$minver --exists "$2" && eval HAVE_$1=yes && eval $1_CFLAGS='"`pkg-config $2 --cflags`"' && eval $1_LIBS='"`pkg-config $2 --libs`"' && answer=yes
[ ! -z $3 ] && minver=$3 && echo -n " with minimum version $minver"
echo -n " ... "
pkg-config --atleast-version=$minver "$2" && eval HAVE_$1=yes && eval $1_CFLAGS='"`pkg-config $2 --cflags`"' && eval $1_LIBS='"`pkg-config $2 --libs`"' && answer=yes
echo $answer
PKG_CONF_USED="$PKG_CONF_USED $1"