diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 37 |
1 files changed, 27 insertions, 10 deletions
@@ -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 @@ -4168,6 +4179,12 @@ if test "$_libcurl" != "no"; then LIBCURL_LIBS=`$_libcurlconfig --libs` LIBCURL_CFLAGS=`$_libcurlconfig --cflags` + case $_host_os in + amigaos*) + append_var LIBCURL_LIBS "-lpthread" + ;; + esac + if test "$_libcurl" = "auto"; then _libcurl=no |