[vlc-devel] [PATCH 7/7] configure.ac: link CoreServices only on MacOSX

Alexandre Janniaux ajanni at videolabs.io
Fri Apr 24 17:02:05 CEST 2020


CoreServices is an iOS 12.0+ API so it cannot be linked when targetting
iOS 9.0. However it is still needed for MacOS and available since 10.0+
which is lesser than the target version.

See https://developer.apple.com/documentation/coreservices
---
 configure.ac | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4fd1240d09..8011643371 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,7 +199,7 @@ case "${host_os}" in
     AX_APPEND_FLAG([-Wl,-headerpad_max_install_names], [LDFLAGS])
 
     VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit])
-    VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,CoreServices])
+    VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation])
 
     AC_EGREP_CPP(yes,
             [#import <TargetConditionals.h>
@@ -220,6 +220,8 @@ case "${host_os}" in
              ac_cv_func_fork=no
              ],)
 
+    AS_IF([test "${HAVE_OSX}" = "1"],[VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreServices])])
+
     dnl
     dnl  Handle Mac OS X SDK flags
     dnl
-- 
2.26.1



More information about the vlc-devel mailing list