[RFC,3/6] configure: Allow linking to the gnutls library

Message ID 1320067723-45345-4-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö Oct. 31, 2011, 1:28 p.m.
---
 configure |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/configure b/configure
index a9bdb62..27366fd 100755
--- a/configure
+++ b/configure
@@ -162,6 +162,7 @@  External library support:
   --enable-avisynth        enable reading of AVISynth script files [no]
   --enable-bzlib           enable bzlib [autodetect]
   --enable-frei0r          enable frei0r video filtering
+  --enable-gnutls          enable gnutls [no]
   --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
   --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
   --enable-libopencv       enable video filtering via libopencv [no]
@@ -922,6 +923,7 @@  CONFIG_LIST="
     avserver
     fft
     frei0r
+    gnutls
     golomb
     gpl
     gray
@@ -2575,6 +2577,8 @@  die_license_disabled gpl x11grab
 die_license_disabled nonfree libfaac
 die_license_disabled nonfree openssl
 
+check_cpp_condition gnutls/gnutls.h "GNUTLS_VERSION_MAJOR >= 3" && \
+    die_license_disabled version3 gnutls
 die_license_disabled version3 libopencore_amrnb
 die_license_disabled version3 libopencore_amrwb
 die_license_disabled version3 libvo_aacenc
@@ -2888,6 +2892,7 @@  check_mathfunc truncf
 # these are off by default, so fail if requested and not available
 enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
 enabled frei0r     && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
+enabled gnutls     && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
 enabled libdirac   && require_pkg_config dirac                          \
     "libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h"  \
     "dirac_decoder_init dirac_encoder_init"
@@ -3176,6 +3181,7 @@  echo "libva enabled             ${vaapi-no}"
 echo "libvdpau enabled          ${vdpau-no}"
 echo "AVISynth enabled          ${avisynth-no}"
 echo "frei0r enabled            ${frei0r-no}"
+echo "gnutls enabled            ${gnutls-no}"
 echo "libcdio support           ${libcdio-no}"
 echo "libdc1394 support         ${libdc1394-no}"
 echo "libdirac enabled          ${libdirac-no}"