From 615c638c7da1be395a13dd107be004b03a9c390d Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 29 May 2016 18:47:10 -0400 Subject: 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 --- tools/configure | 11 ++++++++--- 1 file 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 -- cgit v1.2.3