From 3d75d40acbaf8a259f2f16e1f78544140d2e3626 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 12 Nov 2019 23:25:55 +0100 Subject: CONFIGURE: Detect SDL_Net with pkg-config when available --- configure | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'configure') 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 -- cgit v1.2.3