diff --git a/linphone/mediastreamer2/acinclude.m4 b/linphone/mediastreamer2/acinclude.m4 index 4a06ddc9b..a1338ea99 100644 --- a/linphone/mediastreamer2/acinclude.m4 +++ b/linphone/mediastreamer2/acinclude.m4 @@ -110,10 +110,21 @@ AC_DEFUN([MS_CHECK_VIDEO],[ AC_CHECK_HEADERS(libswscale/swscale.h) CPPFLAGS=$CPPFLAGS_save - PKG_CHECK_MODULES(SDL, [sdl >= 1.2.0 ],sdl_found=yes,sdl_found=no) + AC_ARG_ENABLE(sdl, + [ --disable-sdl Disable SDL support], + [case "${enableval}" in + yes) enable_sdl=true ;; + no) enable_sdl=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-sdl) ;; + esac],[enable_sdl=true]) - if test "$sdl_found" = "no" && test "$mingw_found" != "yes"; then + sdl_found=no + if test "$enable_sdl" = "true"; then + PKG_CHECK_MODULES(SDL, [sdl >= 1.2.0 ],sdl_found=yes,sdl_found=no) + + if test "$sdl_found" = "no" && test "$mingw_found" != "yes"; then AC_MSG_ERROR([Could not find libsdl headers and library. This is mandatory for video support]) + fi fi AC_ARG_ENABLE(theora,