]> git.sesse.net Git - ffmpeg/blobdiff - configure
Merge commit '08d006f5a8ae0faef76d3dccea699c3af3db5b63'
[ffmpeg] / configure
index a90fef18539987e525a01645b23523a3139a12f5..aabcdc253f71d02e039103f30936c8edb27f52a6 100755 (executable)
--- a/configure
+++ b/configure
@@ -87,6 +87,7 @@ Standard options:
   --shlibdir=DIR           install shared libs in DIR [LIBDIR]
   --incdir=DIR             install includes in DIR [PREFIX/include]
   --mandir=DIR             install man page in DIR [PREFIX/share/man]
+  --pkgconfigdir=DIR       install pkg-config files in DIR [LIBDIR/pkgconfig]
   --enable-rpath           use rpath to allow installing libraries in paths
                            not part of the dynamic linker search path
                            use rpath when linking programs [USE WITH CARE]
@@ -268,13 +269,15 @@ External library support:
   --disable-lzma           disable lzma [autodetect]
   --enable-decklink        enable Blackmagick DeckLink I/O support [no]
   --enable-mmal            enable decoding via MMAL [no]
-  --enable-nvenc           enable NVIDIA NVENC support [no]
+  --enable-nvenc           enable encoding via NVENC [no]
   --enable-openal          enable OpenAL 1.1 capture support [no]
   --enable-opencl          enable OpenCL code
   --enable-opengl          enable OpenGL rendering [no]
   --enable-openssl         enable openssl, needed for https support
                            if gnutls is not used [no]
   --disable-sdl            disable sdl [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]
   --disable-xlib           disable xlib [autodetect]
   --disable-zlib           disable zlib [autodetect]
@@ -339,6 +342,8 @@ Advanced options (experts only):
 Optimization options (experts only):
   --disable-asm            disable all assembly optimizations
   --disable-altivec        disable AltiVec optimizations
+  --disable-vsx            disable VSX optimizations
+  --disable-power8         disable POWER8 optimizations
   --disable-amd3dnow       disable 3DNow! optimizations
   --disable-amd3dnowext    disable 3DNow! extended optimizations
   --disable-mmx            disable MMX optimizations
@@ -1423,6 +1428,7 @@ EXTERNAL_LIBRARY_LIST="
     opengl
     openssl
     sdl
+    securetransport
     x11grab
     xlib
     zlib
@@ -1607,6 +1613,7 @@ ARCH_EXT_LIST_PPC="
     altivec
     dcbzl
     ldbrx
+    power8
     ppc4xx
     vsx
 "
@@ -1665,6 +1672,7 @@ HEADERS_LIST="
     asm_types_h
     cdio_paranoia_h
     cdio_paranoia_paranoia_h
+    cuda_h
     dev_bktr_ioctl_bt848_h
     dev_bktr_ioctl_meteor_h
     dev_ic_bt8xx_h
@@ -1763,6 +1771,7 @@ SYSTEM_FUNCS="
     isatty
     jack_port_get_latency_range
     kbhit
+    LoadLibrary
     localtime_r
     lzo1x_999_compress
     mach_absolute_time
@@ -1886,6 +1895,7 @@ CONFIG_EXTRA="
     fmtconvert
     frame_thread_encoder
     gcrypt
+    gmp
     golomb
     gplv3
     h263dsp
@@ -1912,7 +1922,6 @@ CONFIG_EXTRA="
     mpegaudiodsp
     mpegvideo
     mpegvideoenc
-    nettle
     pixblockdsp
     qpeldsp
     qsv
@@ -1954,6 +1963,7 @@ PATHS_LIST="
     incdir
     libdir
     mandir
+    pkgconfigdir
     prefix
     shlibdir
 "
@@ -2040,7 +2050,8 @@ altivec_deps="ppc"
 dcbzl_deps="ppc"
 ldbrx_deps="ppc"
 ppc4xx_deps="ppc"
-vsx_deps="ppc"
+vsx_deps="altivec"
+power8_deps="vsx"
 
 cpunop_deps="i686"
 x86_64_select="i686"
@@ -2107,6 +2118,8 @@ mpegaudio_select="mpegaudiodsp"
 mpegaudiodsp_select="dct"
 mpegvideo_select="blockdsp h264chroma hpeldsp idctdsp me_cmp videodsp"
 mpegvideoenc_select="me_cmp mpegvideo pixblockdsp qpeldsp"
+nvenc_deps_any="dlopen LoadLibrary"
+nvenc_extralibs='$ldl'
 qsvdec_select="qsv"
 qsvenc_select="qsv"
 
@@ -2184,11 +2197,13 @@ h263p_decoder_select="h263_decoder"
 h263p_encoder_select="h263_encoder"
 h264_decoder_select="cabac golomb h264chroma h264dsp h264pred h264qpel startcode videodsp"
 h264_decoder_suggest="error_resilience"
+h264_nvenc_encoder_deps="nvenc cuda_h"
 h264_qsv_decoder_deps="libmfx"
 h264_qsv_decoder_select="h264_mp4toannexb_bsf h264_parser qsvdec h264_qsv_hwaccel"
 h264_qsv_encoder_deps="libmfx"
 h264_qsv_encoder_select="qsvenc"
 hevc_decoder_select="bswapdsp cabac golomb videodsp"
+hevc_nvenc_encoder_deps="nvenc cuda_h"
 huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp"
 huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llviddsp"
 iac_decoder_select="imc_decoder"
@@ -2602,7 +2617,7 @@ x11grab_xcb_indev_deps="libxcb"
 # protocols
 bluray_protocol_deps="libbluray"
 ffrtmpcrypt_protocol_deps="!librtmp_protocol"
-ffrtmpcrypt_protocol_deps_any="gcrypt nettle openssl"
+ffrtmpcrypt_protocol_deps_any="gcrypt gmp openssl"
 ffrtmpcrypt_protocol_select="tcp_protocol"
 ffrtmphttp_protocol_deps="!librtmp_protocol"
 ffrtmphttp_protocol_select="http_protocol"
@@ -2634,9 +2649,10 @@ sctp_protocol_deps="struct_sctp_event_subscribe"
 sctp_protocol_select="network"
 srtp_protocol_select="rtp_protocol"
 tcp_protocol_select="network"
-tls_gnutls_protocol_deps="gnutls"
-tls_openssl_protocol_deps="openssl !tls_gnutls_protocol"
-tls_protocol_deps_any="tls_gnutls_protocol tls_openssl_protocol"
+tls_securetransport_protocol_deps="securetransport"
+tls_gnutls_protocol_deps="gnutls !tls_securetransport_protocol"
+tls_openssl_protocol_deps="openssl !tls_securetransport_protocol !tls_gnutls_protocol"
+tls_protocol_deps_any="tls_securetransport_protocol tls_gnutls_protocol tls_openssl_protocol"
 tls_protocol_select="tcp_protocol"
 udp_protocol_select="network"
 udplite_protocol_select="network"
@@ -2696,6 +2712,8 @@ sab_filter_deps="gpl swscale"
 scale_filter_deps="swscale"
 select_filter_select="pixelutils"
 smartblur_filter_deps="gpl swscale"
+showcqt_filter_deps="avcodec"
+showcqt_filter_select="fft"
 showspectrum_filter_deps="avcodec"
 showspectrum_filter_select="rdft"
 spp_filter_deps="gpl avcodec"
@@ -3989,19 +4007,27 @@ elif enabled ppc; then
         ;;
         g4|745*|ppc745*|powerpc745*)
             cpuflags="-mcpu=7450"
+            disable vsx
         ;;
         74*|ppc74*|powerpc74*)
             cpuflags="-mcpu=7400"
+            disable vsx
         ;;
         g5|970|ppc970|powerpc970)
             cpuflags="-mcpu=970"
+            disable vsx
         ;;
-        power[3-8]*)
+        power[3-6]*)
+            cpuflags="-mcpu=$cpu"
+            disable vsx
+        ;;
+        power[7-8]*)
             cpuflags="-mcpu=$cpu"
         ;;
         cell)
             cpuflags="-mcpu=cell"
             enable ldbrx
+            disable vsx
         ;;
         e500mc)
             cpuflags="-mcpu=e500mc"
@@ -4487,6 +4513,7 @@ check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PI
 
 set_default libdir
 : ${shlibdir_default:="$libdir"}
+: ${pkgconfigdir_default:="$libdir/pkgconfig"}
 
 set_default $PATHS_LIST
 set_default nm
@@ -4779,8 +4806,14 @@ EOF
     fi
 
     if enabled vsx; then
-        check_cflags -mvsx
+        check_cflags -mvsx &&
+        check_builtin vec_vsx_ld "altivec.h" "__builtin_vec_vsx_ld" || disable vsx
     fi
+
+    if enabled power8; then
+        check_cpp_condition "altivec.h" "defined(_ARCH_PWR8)" || disable power8
+    fi
+
 elif enabled x86; then
 
     check_builtin rdtsc    intrin.h   "__rdtsc()"
@@ -4951,6 +4984,7 @@ check_func_headers windows.h CoTaskMemFree -lole32
 check_func_headers windows.h GetProcessAffinityMask
 check_func_headers windows.h GetProcessTimes
 check_func_headers windows.h GetSystemTimeAsFileTime
+check_func_headers windows.h LoadLibrary
 check_func_headers windows.h MapViewOfFile
 check_func_headers windows.h PeekNamedPipe
 check_func_headers windows.h SetConsoleTextAttribute
@@ -4961,6 +4995,7 @@ check_func_headers glob.h glob
 enabled xlib &&
     check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
 
+check_header cuda.h
 check_header direct.h
 check_header dlfcn.h
 check_header d3d11.h
@@ -5145,10 +5180,6 @@ enabled mmal              && { check_lib interface/mmal/mmal.h mmal_port_connect
                                     check_lib interface/mmal/mmal.h mmal_port_connect ; }
                                 check_lib interface/mmal/mmal.h mmal_port_connect ; } ||
                                die "ERROR: mmal not found"; }
-enabled nvenc             && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } &&
-                             { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" ||
-                               die "ERROR: NVENC API version 4 or older is not supported"; } &&
-                             { [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; }
 enabled openal            && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
                                check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
                                die "ERROR: openal not found"; } &&
@@ -5173,7 +5204,7 @@ enabled openssl           && { check_lib openssl/ssl.h SSL_library_init -lssl -l
 enabled qtkit_indev      && { check_header_oc QTKit/QTKit.h || disable qtkit_indev; }
 
 if enabled gnutls; then
-    { check_lib nettle/bignum.h nettle_mpz_get_str_256 -lnettle -lhogweed -lgmp && enable nettle; } ||
+    { check_lib2 gmp.h mpz_export -lgmp && enable gmp; } ||
     { check_lib gcrypt.h gcry_mpi_new -lgcrypt && enable gcrypt; }
 fi
 
@@ -5185,6 +5216,14 @@ if enabled libdc1394; then
         enable libdc1394_1; } ||
     die "ERROR: No version of libdc1394 found "
 fi
+
+if enabled nvenc; then
+    check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found.";
+    check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" ||
+        die "ERROR: NVENC API version 4 or older is not supported";
+    { [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; }
+fi
+
 if ! disabled sdl; then
     SDL_CONFIG="${cross_prefix}sdl-config"
     if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
@@ -5208,6 +5247,10 @@ if ! disabled sdl; then
 fi
 enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
 
+disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
+    check_lib2 "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
+    enable securetransport; }
+
 makeinfo --version > /dev/null 2>&1 && enable makeinfo  || disable makeinfo
 enabled makeinfo && (makeinfo --version | \
                      grep -q 'makeinfo (GNU texinfo) 5' > /dev/null 2>&1) \
@@ -5728,8 +5771,9 @@ if enabled mips; then
 fi
 if enabled ppc; then
     echo "AltiVec enabled           ${altivec-no}"
+    echo "VSX enabled               ${vsx-no}"
+    echo "POWER8 enabled            ${power8-no}"
     echo "PPC 4xx optimizations     ${ppc4xx-no}"
-    echo "PPC VSX optimizations     ${vsx-no}"
     echo "dcbzl available           ${dcbzl-no}"
 fi
 echo "debug symbols             ${debug-no}"
@@ -5799,6 +5843,7 @@ BINDIR=\$(DESTDIR)$bindir
 DATADIR=\$(DESTDIR)$datadir
 DOCDIR=\$(DESTDIR)$docdir
 MANDIR=\$(DESTDIR)$mandir
+PKGCONFIGDIR=\$(DESTDIR)$pkgconfigdir
 SRC_PATH=$source_path
 ifndef MAIN_MAKEFILE
 SRC_PATH:=\$(SRC_PATH:.%=..%)