155155
156156if test $system = MacOSX; then
157157 MACOS_LEGACY=no
158- os_version_major=`uname -r |cut -d . -f 1`
159- if test $os_version_major -lt 19; then # Darwin 19.0.0 is macOS 10.15
158+ macos_major=$(sw_vers -productVersion | cut -d. -f1)
159+ macos_minor=$(sw_vers -productVersion | cut -d. -f2)
160+ if test ${macos_major?} -eq 10 && test ${macos_minor?} -lt 15; then
160161 MACOS_LEGACY=yes
161162 fi
162163 CFLAGS="$CFLAGS $COMMON_OSX_FLAGS"
@@ -447,7 +448,8 @@ AC_ARG_VAR([AJA_DIRECTORY], [Directory to AJA NTV2 SDK.])
447448AC_ARG_VAR ( [ BLUE_LATEST_SDK] , [ Placement of Bluefish444 SDK.] )
448449AC_ARG_VAR ( [ CINEFORM_DIRECTORY] , [ Directory to Cineform SDK.] )
449450AC_ARG_VAR ( [ CUDA_FLAGS] , [ Flags to be passed to CUDA compiler, eg. -arch=native; alterntatively CUDAFLAGS] )
450- AC_ARG_VAR ( [ CUDA_PATH] , [ Directory of your Nvidia toolkit instalation.] )
451+ AC_ARG_VAR ( [ CUDA_PATH] , [ Directory of your Nvidia toolkit instalation.] dnl
452+ [ Alternative: CUDACXX (path to nvcc executable)] )
451453AC_ARG_VAR ( [ DELTACAST_DIRECTORY] , [ Placement of VideoMasterHD directory (Deltacast).] )
452454AC_ARG_VAR ( [ DVS_DIRECTORY] , [ Path to DVS installation.] )
453455AC_ARG_VAR ( [ GENICAM_GENTL64_PATH] , [ XIMEA SDK library path] )
@@ -520,7 +522,7 @@ if test $cuda_req != no; then
520522 # nvcc is intentional here
521523 AC_PATH_PROG ( NVCC , nvcc , [ ] , [ $CUDA_PATH_SEP$PATH] dnl
522524 [ $PATH_SEPARATOR/opt/cuda/bin$PATH_SEPARATOR/usr/local/cuda/bin] )
523- if -z "$NVCC" && -e "$CUDACXX"; then
525+ if test -z "$NVCC" && test -x "$CUDACXX"; then
524526 NVCC=$CUDACXX
525527 fi
526528fi
@@ -2210,23 +2212,43 @@ sc_details=
22102212
22112213AC_ARG_ENABLE ( screen ,
22122214[ --disable-screen disable screen capture (default is auto)]
2213- [ --enable-screen@<:@ =x11,pipewire@:>@ @<:@ Linux only@:>@ choose implementation (can be both)]
2214- [ Requires: none (OSX) x11 or pipewire (Linux) dshow (Win)] ,
2215+ AS_HELP_STRING ( [ --enable-screen@<:@ =x11,pipewire,cg@:>@ ] ,
2216+ [ choose implementation (Linux: can be both x11 and pipewire; macOS: cg]
2217+ [ - use Core Graphics implementation instead of AV Foundation).]
2218+ [ Requires: macOS<15 (cg), AVF (macOS otherwise); X11 or PipeWire (Linux); DShow (Win)] ) ,
22152219 [ screen_cap_req=$enableval] ,
22162220 [ screen_cap_req=$build_default]
22172221 )
22182222
2219- case "$system" in
2220- MacOSX)
2221- if test "$os_version_major" -lt 24; then # Darwin 24.0.0 is macOS 15
2222- screen_cap=yes
2223+ if test "${system?}" = Linux && test "${screen_cap_req?}" = yes; then
2224+ screen_cap_req=pipewire,x11
2225+ fi
2226+
2227+ if test "${system?}" = Windows && test "${screen_cap_req?}" != no; then
2228+ SCREEN_CAP_OBJ="src/video_capture/screen_win.o"
2229+ DLL_LIBS="${DLL_LIBS:+$DLL_LIBS }${srcdir}/data/screen-capture-recorder-x64.dll"
2230+ screen_cap=$dshow
2231+ fi
2232+
2233+ if test "${system?}" = MacOSX && test "${screen_cap_req?}" != no; then
2234+ if test "${avfoundation?}" = no || test "${screen_cap_req?}" = cg; then
2235+ if test "${macos_major?}" -ge 15; then
2236+ AC_MSG_WARN ( [ Core Graphics screen capture] dnl
2237+ [ unsupported since macOS 15!] )
2238+ else
2239+ SCREEN_CAP_OBJ="src/video_capture/screen_osx.o"
22232240 SCREEN_CAP_LIB="-framework CoreFoundation"
2241+ screen_modules="Core Graphics"
2242+ screen_cap=yes
22242243 fi
2225- ;;
2226- Windows)
2227- screen_cap=$dshow
2228- ;;
2229- esac
2244+ else
2245+ if test "${avfoundation?}" = yes; then
2246+ SCREEN_CAP_OBJ="src/video_capture/screen_avf.o"
2247+ screen_modules="AV Foundation"
2248+ screen_cap=yes
2249+ fi
2250+ fi
2251+ fi
22302252
22312253# X11
22322254screen_cap_x11=no
22602282# PipeWire
22612283found_screen_screen_pw_deps=no
22622284screen_cap_pw=no
2263- if test $screen_cap_req != no && test $screen_cap_req != x11; then
2285+ if test ${system?} = Linux && test ${screen_cap_req?} != no &&
2286+ test ${screen_cap_req} != x11; then
22642287 PKG_CHECK_MODULES([ SCREEN_PW_DEPS] , [ glib-2.0 gobject-2.0 gio-unix-2.0 ] , [ found_screen_screen_pw_deps=yes] , [ found_screen_screen_pw_deps=no] )
22652288fi
22662289
@@ -2283,23 +2306,22 @@ fi
22832306
22842307if test $screen_cap_req != no && test $screen_cap = yes
22852308then
2286- if test $system = MacOSX; then
2287- SCREEN_CAP_OBJ="src/video_capture/screen_osx.o"
2288- elif test $system = Linux; then
2309+ if test $system = Linux; then
22892310 SCREEN_CAP_OBJ="src/video_capture/screen_linux.o"
2290- else
2291- SCREEN_CAP_OBJ="src/video_capture/screen_win.o"
2292- DLL_LIBS="${DLL_LIBS:+$DLL_LIBS }${srcdir}/data/screen-capture-recorder-x64.dll"
22932311 fi
22942312 add_module vidcap_screen "$SCREEN_CAP_OBJ" "$SCREEN_CAP_LIB"
22952313else
22962314 screen_cap=no
22972315fi
22982316
2299- if { test $screen_cap_req = yes && { test $screen_cap = no || { test $system = Linux && { test $screen_cap_x11 = no || test $screen_cap_pw = no; }; }; }; } \
2300- || { test $screen_cap_req = x11 && test $screen_cap_x11 = no; } || { test $screen_cap_req = pipewire && test $screen_cap_pw = no; }
2301- then
2302- AC_MSG_ERROR ( [ Screen capture not found] ) ;
2317+ ENSURE_FEATURE_PRESENT([ $screen_cap_req] , [ $screen_cap] , [ Screen capture not found] )
2318+
2319+ if { expr "x${screen_cap_req?}" : "x.*x11" >/dev/null &&
2320+ test "${screen_cap_x11?}" = no; } ||
2321+ { expr "x${screen_cap_req?}" : "x.*pipewire" >/dev/null &&
2322+ test "${screen_cap_pw?}" = no; }; then
2323+ AC_MSG_ERROR ( [ Desired screen capture implementation not found!]
2324+ [ Wanted: ${screen_cap_req?}] )
23032325fi
23042326
23052327if test -n "$screen_modules"; then
@@ -3255,7 +3277,8 @@ ENSURE_FEATURE_PRESENT([$cmpto_j2k_req], [$cmpto_j2k], [Comprimato J2K not found
32553277# ------------------------------------------------------------------------------
32563278ndi=no
32573279AC_ARG_ENABLE ( ndi ,
3258- AS_HELP_STRING ( [ --enable-ndi@<:@ =ver@:>@ ] , [ enables NDI support (default is auto)] ) ,
3280+ AS_HELP_STRING ( [ --enable-ndi@<:@ =ver@:>@ ] , [ enables NDI support (default is auto).]
3281+ [ Set ver to 5 if using NDI 5.] ) ,
32593282 [ ndi_req=$enableval] ,
32603283 [ ndi_req=$build_default]
32613284 )
0 commit comments