[2/2] configure: use test_pkg_config() for the SDL check

Message ID 20170929174657.5352-2-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Sept. 29, 2017, 5:46 p.m.
Removes the extra code to preserve global cflags and extralibs.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 configure | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Patch

diff --git a/configure b/configure
index b9b243362..36e2ca661 100755
--- a/configure
+++ b/configure
@@ -2601,6 +2601,7 @@  avconv_suggest="psapi shell32"
 avplay_deps="avcodec avfilter avformat avresample sdl"
 avplay_select="rdft format_filter transpose_filter hflip_filter vflip_filter"
 avplay_suggest="shell32"
+avplay_extralibs="sdl_extralibs"
 avprobe_deps="avcodec avformat"
 avprobe_suggest="shell32"
 
@@ -4874,10 +4875,7 @@  fi
 
 # SDL is "special" and adds some CFLAGS that should not pollute anything else.
 if enabled avplay; then
-    CFLAGS_SAVE=$CFLAGS
-    check_pkg_config sdl "sdl >= 1.2.1 sdl < 1.3.0" SDL_events.h SDL_PollEvent &&
-    sdl_cflags=$pkg_cflags
-    CFLAGS=$CFLAGS_SAVE
+    test_pkg_config sdl "sdl >= 1.2.1 sdl < 1.3.0" SDL_events.h SDL_PollEvent
 fi
 
 ! disabled pod2man   && check_cmd pod2man --help     && enable pod2man   || disable pod2man