summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJosh de Kock <josh@itanimul.li>2016-02-24 23:31:02 +0000
committerJosh de Kock <josh@itanimul.li>2016-09-24 16:50:40 +0100
commit3877e3d8a8bdd09f6f13b99a555d963bdb0f16f5 (patch)
tree7c1bc0340d698e52a4da9bf51a2543b7ef6b1c9c /configure
parentc29b532a942233b5c804e620d475b3b888fe6e72 (diff)
lavd: Add SDL2 output device
Acked-by: Michael Niedermayer Signed-off-by: Josh de Kock <josh@itanimul.li>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 27 insertions, 1 deletions
diff --git a/configure b/configure
index c0c1c8a869..5434fa1028 100755
--- a/configure
+++ b/configure
@@ -292,6 +292,7 @@ External library support:
--disable-schannel disable SChannel SSP, needed for TLS support on
Windows if openssl and gnutls are not used [autodetect]
--disable-sdl disable sdl [autodetect]
+ --disable-sdl2 disable sdl2 [autodetect]
--disable-securetransport disable Secure Transport, needed for TLS support
on OSX if openssl and gnutls are not used [autodetect]
--enable-x11grab enable X11 grabbing (legacy) [no]
@@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST="
openssl
schannel
sdl
+ sdl2
securetransport
videotoolbox
x11grab
@@ -2022,6 +2024,7 @@ HAVE_LIST="
perl
pod2man
sdl
+ sdl2
section_data_rel_ro
texi2html
threads
@@ -2948,6 +2951,7 @@ pulse_outdev_deps="libpulse"
qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore"
qtkit_indev_select="qtkit"
sdl_outdev_deps="sdl"
+sdl2_outdev_deps="sdl2"
sndio_indev_deps="sndio_h"
sndio_outdev_deps="sndio_h"
v4l_indev_deps="linux_videodev_h"
@@ -5846,7 +5850,28 @@ if enabled gcrypt; then
fi
fi
-if ! disabled sdl; then
+if ! disabled sdl2 && ! enabled sdl; then
+ SDL2_CONFIG="${cross_prefix}sdl2-config"
+ if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags &&
+ check_func SDL_Init $sdl2_libs $sdl2_cflags && enable sdl2
+ else
+ if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
+ sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
+ sdl2_libs=$("${SDL2_CONFIG}" --libs)
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags &&
+ check_func SDL_Init $sdl2_libs $sdl2_cflags && enable sdl2
+ fi
+ fi
+ if test $target_os = "mingw32"; then
+ sdl2_libs="$sdl2_libs -mconsole"
+ fi
+fi
+enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs
+
+if ! disabled sdl && ! enabled sdl2; then
SDL_CONFIG="${cross_prefix}sdl-config"
if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
@@ -6476,6 +6501,7 @@ echo "network support ${network-no}"
echo "threading support ${thread_type-no}"
echo "safe bitstream reader ${safe_bitstream_reader-no}"
echo "SDL support ${sdl-no}"
+echo "SDL2 support ${sdl2-no}"
echo "opencl enabled ${opencl-no}"
echo "JNI support ${jni-no}"
echo "texi2html enabled ${texi2html-no}"