aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2003-11-16 04:03:31 +0000
committerJames Brown2003-11-16 04:03:31 +0000
commitaed2a56e0c008966a8d9e5ce39d3b69eb50e4029 (patch)
tree691c0f840e91fd50814eb425731ce01e2bc4d27b
parent0a8c06f17e7d25940dfbbb0fb5ac5f6e00246775 (diff)
downloadscummvm-rg350-aed2a56e0c008966a8d9e5ce39d3b69eb50e4029.tar.gz
scummvm-rg350-aed2a56e0c008966a8d9e5ce39d3b69eb50e4029.tar.bz2
scummvm-rg350-aed2a56e0c008966a8d9e5ce39d3b69eb50e4029.zip
Patch #842988 (sev) - fix bugs in sdl-config detection
svn-id: r11305
-rwxr-xr-xconfigure31
1 files changed, 21 insertions, 10 deletions
diff --git a/configure b/configure
index afecf05d1e..64ae28232d 100755
--- a/configure
+++ b/configure
@@ -82,17 +82,28 @@ eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_c
find_sdlconfig()
{
printf "Looking for sdl-config... "
-sdlconfigs="$_sdlconfig sdl-config sdl11-config sdl12-config"
-for sdlconfig in $sdlconfigs; do
- if test "-e $sdlconfig" ; then
- _sdlconfig=$sdlconfig
- echo $_sdlconfig
- break
- else
- echo "none found!"
- exit 1
- fi
+sdlconfigs="$_sdlconfig:sdl-config:sdl11-config:sdl12-config"
+_sdlconfig=
+
+IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+
+for path_dir in $PATH; do
+ for sdlconfig in $sdlconfigs; do
+ if test -e "$path_dir/$sdlconfig" ; then
+ _sdlconfig=$sdlconfig
+ echo $_sdlconfig
+ break
+ fi
+ done
done
+
+IFS="$ac_save_ifs"
+
+if test -z "$_sdlconfig"; then
+ echo "none found!"
+ exit 1
+fi
+
}
#