Merge commit '4a1ef543983b7480e2822f6ac281ba361d1f893d'
authorClément Bœsch <u@pkh.me>
Sun, 9 Apr 2017 12:22:43 +0000 (14:22 +0200)
committerClément Bœsch <u@pkh.me>
Sun, 9 Apr 2017 12:22:43 +0000 (14:22 +0200)
* commit '4a1ef543983b7480e2822f6ac281ba361d1f893d':
  build: Drop support for old versions of libdc1394

Merged-by: Clément Bœsch <u@pkh.me>
1  2 
configure
libavdevice/libdc1394.c

diff --cc configure
+++ b/configure
@@@ -2058,21 -1668,12 +2058,19 @@@ HAVE_LIST=
      $THREADS_LIST
      $TOOLCHAIN_FEATURES
      $TYPES_LIST
 +    atomics_native
      dos_paths
      dxva2_lib
 +    dxva2api_cobj
      libc_msvcrt
-     libdc1394_1
-     libdc1394_2
 +    makeinfo
 +    makeinfo_html
      MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
 -    sdl
 +    perl
 +    pod2man
 +    sdl2
      section_data_rel_ro
 +    texi2html
      threads
      vaapi_drm
      vaapi_x11
@@@ -5741,46 -4615,20 +5739,47 @@@ for func in $MATH_FUNCS; d
      eval check_mathfunc $func \${${func}_args:-1} $LIBM
  done
  
 +for func in $COMPLEX_FUNCS; do
 +    eval check_complexfunc $func \${${func}_args:-1}
 +done
 +
  # these are off by default, so fail if requested and not available
 -enabled avisynth          && { check_lib "avisynth/avisynth_c.h windows.h" LoadLibrary ||
 -                               check_lib "avxsynth/avxsynth_c.h dlfcn.h" dlopen -ldl   ||
 -                               die "ERROR: LoadLibrary/dlopen not found, or avisynth header not found"; }
 -enabled cuda              && check_lib cuda.h cuInit -lcuda
 +enabled avfoundation_indev && { check_header_objcc AVFoundation/AVFoundation.h || disable avfoundation_indev; }
 +enabled avfoundation_indev && { check_lib CoreGraphics/CoreGraphics.h CGGetActiveDisplayList -framework CoreGraphics ||
 +                                check_lib ApplicationServices/ApplicationServices.h CGGetActiveDisplayList -framework ApplicationServices; }
 +enabled cuda              && check_header cuda.h # this is not a dependency
 +enabled cuvid             && { enabled cuda ||
 +                               die "ERROR: CUVID requires CUDA"; }
 +enabled chromaprint       && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
 +enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || disable coreimage_filter; }
 +enabled coreimagesrc_filter && { check_header_objcc QuartzCore/CoreImage.h || disable coreimagesrc_filter; }
 +enabled decklink          && { { check_header DeckLinkAPI.h || die "ERROR: DeckLinkAPI.h header not found"; } &&
 +                               { check_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a060100" || die "ERROR: Decklink API version must be >= 10.6.1."; } }
  enabled frei0r            && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
 +enabled gmp               && require gmp gmp.h mpz_export -lgmp
  enabled gnutls            && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
 +enabled jni               && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads &&
 +                               check_lib "dlfcn.h" dlopen -ldl || die "ERROR: jni not found"; }
 +enabled ladspa            && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
 +enabled libiec61883       && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
 +enabled libass            && require_pkg_config libass ass/ass.h ass_library_init
 +enabled libbluray         && require_pkg_config libbluray libbluray/bluray.h bd_open
  enabled libbs2b           && require_pkg_config libbs2b bs2b.h bs2b_open
 -enabled libdcadec         && require libdcadec libdcadec/dca_context.h dcadec_context_create -ldcadec
 -enabled libfaac           && require libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
 -enabled libfdk_aac        && require_pkg_config fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen
 +enabled libcelt           && require libcelt celt/celt.h celt_decode -lcelt0 &&
 +                             { check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
 +                               die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
 +enabled libcaca           && require_pkg_config caca caca.h caca_create_canvas
+ enabled libdc1394         && require_pkg_config libdc1394-2 dc1394/dc1394.h dc1394_new
 +enabled libfdk_aac        && { use_pkg_config fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
 +                               { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
 +                                 warn "using libfdk without pkg-config"; } }
 +flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
 +enabled libflite          && require libflite "flite/flite.h" flite_init $flite_libs
 +enabled fontconfig        && enable libfontconfig
  enabled libfontconfig     && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
 -enabled libfreetype       && require_pkg_config freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
 +enabled libfreetype       && require_libfreetype
 +enabled libfribidi        && require_pkg_config fribidi fribidi.h fribidi_version_info
 +enabled libgme            && require  libgme gme/gme.h gme_new_emu -lgme -lstdc++
  enabled libgsm            && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
                                     check_lib "${gsm_hdr}" gsm_create -lgsm && break;
                                 done || die "ERROR: libgsm not found"; }
@@@ -5914,75 -4709,34 +5913,66 @@@ enabled openssl           && { use_pkg_
                                 check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                                 check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
                                 die "ERROR: openssl not found"; }
 -
 -enabled gnutls            && check_lib gmp.h mpz_export -lgmp && enable gmp
 -
 -if enabled nvenc; then
 -    check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."
 -    check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" ||
 -        die "ERROR: NVENC API version 5 or older is not supported"
 +enabled qtkit_indev      && { check_header_objcc QTKit/QTKit.h || disable qtkit_indev; }
 +
- # libdc1394 check
- if enabled libdc1394; then
-     { require_pkg_config libdc1394-2 dc1394/dc1394.h dc1394_new &&
-         enable libdc1394_2; } ||
-     { check_lib libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394 &&
-         enable libdc1394_1; } ||
-     die "ERROR: No version of libdc1394 found "
- fi
 +if enabled gcrypt; then
 +    GCRYPT_CONFIG="${cross_prefix}libgcrypt-config"
 +    if "${GCRYPT_CONFIG}" --version > /dev/null 2>&1; then
 +        gcrypt_cflags=$("${GCRYPT_CONFIG}" --cflags)
 +        gcrypt_libs=$("${GCRYPT_CONFIG}" --libs)
 +        check_func_headers gcrypt.h gcry_mpi_new $gcrypt_cflags $gcrypt_libs ||
 +            die "ERROR: gcrypt not found"
 +        add_cflags $gcrypt_cflags && add_extralibs $gcrypt_libs
 +    else
 +        require gcrypt gcrypt.h gcry_mpi_new -lgcrypt
 +    fi
  fi
  
 -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 &&
 -    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
 -    enable sdl
 +disabled sdl && disable sdl2
 +if ! disabled sdl2; 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 && enable sdl && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs
 +
 +disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
 +    check_lib "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
 +    enable securetransport; }
  
 -! disabled pod2man   && check_cmd pod2man --help     && enable pod2man   || disable pod2man
 -! disabled texi2html && check_cmd texi2html -version && enable texi2html || disable texi2html
 +disabled schannel || { check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 &&
 +                       check_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" && enable schannel && add_extralibs -lsecur32; }
 +
 +makeinfo --version > /dev/null 2>&1 && enable makeinfo  || disable makeinfo
 +enabled makeinfo \
 +    && [ 0$(makeinfo --version | grep "texinfo" | sed 's/.*texinfo[^0-9]*\([0-9]*\)\..*/\1/') -ge 5 ] \
 +    && enable makeinfo_html || disable makeinfo_html
 +disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
 +perl -v            > /dev/null 2>&1 && enable perl      || disable perl
 +pod2man --help     > /dev/null 2>&1 && enable pod2man   || disable pod2man
 +rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
  
  check_header linux/fb.h
 +check_header linux/videodev.h
  check_header linux/videodev2.h
 -check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete
 -
 -check_header AVFoundation/AVFoundation.h &&
 -    check_objcflags -fobjc-arc &&
 -    add_extralibs -framework Foundation -framework AVFoundation -framework CoreVideo -framework CoreMedia ||
 -    disable AVFoundation_AVFoundation_h
 +check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
  
  check_header sys/videoio.h
 +check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
  
  check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs"
  # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
Simple merge