aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorEugene Sandulenko2019-11-12 23:25:55 +0100
committerEugene Sandulenko2019-11-12 23:26:22 +0100
commit3d75d40acbaf8a259f2f16e1f78544140d2e3626 (patch)
tree24a9324d476b5d2c9ccdc3705a67dfeaeffd64c8 /configure
parent954aeccfb7c5305b524d9bd53453c13b82c6d6f5 (diff)
downloadscummvm-rg350-3d75d40acbaf8a259f2f16e1f78544140d2e3626.tar.gz
scummvm-rg350-3d75d40acbaf8a259f2f16e1f78544140d2e3626.tar.bz2
scummvm-rg350-3d75d40acbaf8a259f2f16e1f78544140d2e3626.zip
CONFIGURE: Detect SDL_Net with pkg-config when available
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 12 insertions, 2 deletions
diff --git a/configure b/configure
index a0413b6409..146c4247f3 100755
--- a/configure
+++ b/configure
@@ -3800,10 +3800,20 @@ if test "$_sdl" = yes ; then
case $_sdlversion in
2.0.*)
add_line_to_config_mk "USE_SDL2 = 1"
- append_var SDL_NET_LIBS "-lSDL2_net"
+ if test "$_pkg_config" = "yes" && $_pkgconfig --exists sdl2_net; then
+ append_var SDL_NET_LIBS "`$_pkgconfig --libs sdl2_net`"
+ append_var SDL_NET_CFLAGS "`$_pkgconfig --cflags sdl2_net`"
+ else
+ append_var SDL_NET_LIBS "-lSDL2_net"
+ fi
;;
*)
- append_var SDL_NET_LIBS "-lSDL_net"
+ if test "$_pkg_config" = "yes" && $_pkgconfig --exists sdl_net; then
+ append_var SDL_NET_LIBS "`$_pkgconfig --libs sdl_net`"
+ append_var SDL_NET_CFLAGS "`$_pkgconfig --cflags sdl_net`"
+ else
+ append_var SDL_NET_LIBS "-lSDL_net"
+ fi
;;
esac