]> git.sesse.net Git - ffmpeg/commitdiff
configure: Simplify and fix avfoundation indev handling
authorDiego Biurrun <diego@biurrun.de>
Mon, 28 Nov 2016 07:55:31 +0000 (08:55 +0100)
committerDiego Biurrun <diego@biurrun.de>
Mon, 5 Dec 2016 17:07:24 +0000 (18:07 +0100)
Handle extralibs in the standard way, add missing pthreads dependency.
Also globally check for -fobj-arc with Objective-C compilers since
that option is useful for other Objective-C code as well.

configure

index 37482cf1ef558048f248f1a5751318548759a0b6..fae5be0b95e9577d059d4af056b7ab1f222d1cd7 100755 (executable)
--- a/configure
+++ b/configure
@@ -2362,7 +2362,8 @@ xwma_demuxer_select="riffdec"
 # indevs / outdevs
 alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
 alsa_outdev_deps="alsa_asoundlib_h"
-avfoundation_indev_deps="AVFoundation_AVFoundation_h"
+avfoundation_indev_deps="AVFoundation_AVFoundation_h objc_arc pthreads"
+avfoundation_indev_extralibs="-framework Foundation -framework AVFoundation -framework CoreVideo -framework CoreMedia"
 bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
 dv1394_indev_deps="dv1394"
 dv1394_indev_select="dv_demuxer"
@@ -4721,10 +4722,7 @@ check_header linux/fb.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_header AVFoundation/AVFoundation.h
 
 check_header sys/videoio.h
 
@@ -4839,6 +4837,8 @@ check_disable_warning_headers(){
 check_disable_warning_headers -Wno-deprecated-declarations
 check_disable_warning_headers -Wno-unused-variable
 
+check_objcflags -fobjc-arc && enable objc_arc
+
 # add some linker flags
 check_ldflags -Wl,--warn-common
 check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample