aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorEugene Sandulenko2016-09-10 22:43:06 +0200
committerEugene Sandulenko2016-09-10 22:43:06 +0200
commiteb64843a3b73e7af1fb033eb8503d1d8c5e4477b (patch)
treef89c30d55223c5b85b5ab2b335794cb86ddb8e55 /configure
parent18cc11e6947d78d3127a423488439eb05ce61f49 (diff)
downloadscummvm-rg350-eb64843a3b73e7af1fb033eb8503d1d8c5e4477b.tar.gz
scummvm-rg350-eb64843a3b73e7af1fb033eb8503d1d8c5e4477b.tar.bz2
scummvm-rg350-eb64843a3b73e7af1fb033eb8503d1d8c5e4477b.zip
CONFIGURE: Some platforms, e.g. Amiga, require SDL to be after SDL_Net. Change accordingly
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
1 files changed, 21 insertions, 10 deletions
diff --git a/configure b/configure
index 2f4ed0b38e..1ba85aac06 100755
--- a/configure
+++ b/configure
@@ -70,13 +70,23 @@ get_var() {
}
append_var() {
- VAR=${1}
- shift
- if eval test -z \"\$${VAR}\" ; then
- eval ${VAR}='$@'
- else
- eval ${VAR}=\"\$${VAR} \"'$@'
- fi
+ VAR=${1}
+ shift
+ if eval test -z \"\$${VAR}\" ; then
+ eval ${VAR}='$@'
+ else
+ eval ${VAR}=\"\$${VAR} \"'$@'
+ fi
+}
+
+prepend_var() {
+ VAR=${1}
+ shift
+ if eval test -z \"\$${VAR}\" ; then
+ eval ${VAR}='$@'
+ else
+ eval ${VAR}='$@' \"\$${VAR} \"
+ fi
}
# Add an engine: id name build subengines base-games dependencies
@@ -3370,15 +3380,16 @@ case $_backend in
#include "SDL_net.h"
int main(int argc, char *argv[]) { SDLNet_Init(); return 0; }
EOF
- cc_check $LIBS $INCLUDES $SDL_NET_CFLAGS $SDL_NET_LIBS && _sdlnet=yes
+ cc_check $SDL_NET_LIBS $LIBS $INCLUDES $SDL_NET_CFLAGS && _sdlnet=yes
fi
if test "$_sdlnet" = yes ; then
- append_var LIBS "$SDL_NET_LIBS"
+ # Some platforms require SDL to be after SDL_Net, thus we prepend var
+ prepend_var LIBS "$SDL_NET_LIBS"
append_var INCLUDES "$SDL_NET_CFLAGS"
fi
define_in_config_if_yes "$_sdlnet" 'USE_SDL_NET'
echo "$_sdlnet"
-
+
;;
esac