CONFIGURE: Some platforms, e.g. Amiga, require SDL to be after SDL_Net. Change accordingly
This commit is contained in:
parent
18cc11e694
commit
eb64843a3b
1 changed files with 21 additions and 10 deletions
31
configure
vendored
31
configure
vendored
|
@ -70,13 +70,23 @@ get_var() {
|
||||||
}
|
}
|
||||||
|
|
||||||
append_var() {
|
append_var() {
|
||||||
VAR=${1}
|
VAR=${1}
|
||||||
shift
|
shift
|
||||||
if eval test -z \"\$${VAR}\" ; then
|
if eval test -z \"\$${VAR}\" ; then
|
||||||
eval ${VAR}='$@'
|
eval ${VAR}='$@'
|
||||||
else
|
else
|
||||||
eval ${VAR}=\"\$${VAR} \"'$@'
|
eval ${VAR}=\"\$${VAR} \"'$@'
|
||||||
fi
|
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
|
# Add an engine: id name build subengines base-games dependencies
|
||||||
|
@ -3370,15 +3380,16 @@ case $_backend in
|
||||||
#include "SDL_net.h"
|
#include "SDL_net.h"
|
||||||
int main(int argc, char *argv[]) { SDLNet_Init(); return 0; }
|
int main(int argc, char *argv[]) { SDLNet_Init(); return 0; }
|
||||||
EOF
|
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
|
fi
|
||||||
if test "$_sdlnet" = yes ; then
|
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"
|
append_var INCLUDES "$SDL_NET_CFLAGS"
|
||||||
fi
|
fi
|
||||||
define_in_config_if_yes "$_sdlnet" 'USE_SDL_NET'
|
define_in_config_if_yes "$_sdlnet" 'USE_SDL_NET'
|
||||||
echo "$_sdlnet"
|
echo "$_sdlnet"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue