summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2016-05-29 18:47:10 -0400
committerFranklin Wei <frankhwei536@gmail.com>2016-06-01 15:11:09 -0400
commit615c638c7da1be395a13dd107be004b03a9c390d (patch)
treef9c4776af1b0bf0db1121e11833b1df92f617a89
parent86df983eee86eafe9325fc28a0ebe9d1c42c77cd (diff)
Fix broken simulator build with weird sdl-config
* --static-libs isn't supported on some (possibly newer) SDL installs, falls back to --libs if this is the case Patch mostly by Amaury Pouly. Change-Id: I6dd2f4847f2a2d1de7b2d287c0af6651cec461ff
-rwxr-xr-xtools/configure11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/configure b/tools/configure
index ff05747853..4c742f500f 100755
--- a/tools/configure
+++ b/tools/configure
@@ -339,13 +339,18 @@ simcc () {
echo "don't have SDL (properly) installed. Please correct and"
echo "re-run configure!"
exit 2
- else
+ else
# generic sdl-config checker
GCCOPTS="$GCCOPTS `$sdl --cflags`"
- LDOPTS="$LDOPTS `$sdl --static-libs`"
+ if sdl-config --static-libs > /dev/null 2>&1 ; then
+ LDOPTS="$LDOPTS `$sdl --static-libs`"
+ else
+ echo "Your sdl-config does not know about static libs, falling back to shared library"
+ LDOPTS="$LDOPTS `$sdl --libs`"
+ fi
fi
fi
-
+
GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
# x86_64 supports MMX by default