diff options
author | fuzzard <fuzzard@kodi.tv> | 2020-09-24 18:35:55 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2020-09-28 13:47:10 +1000 |
commit | 9089cb8774bbbb69bc2d43d156077a0bda036f32 (patch) | |
tree | 1336ea26e73b1c7ba56c98b766bdaad6091aaf85 /tools | |
parent | d9be32b744d4abc20f4b3491332c85c7e559eb15 (diff) |
[tools/depends] configure abort if sdk not available to xcodebuild
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/configure.ac | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 5db5ea6296..83831b01fb 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -358,7 +358,14 @@ case $host in found_sdk_version=[`$use_xcodebuild -showsdks | grep "\-sdk $target_platform" | awk '{ print $2}'`] use_sdk="${use_sdk:-$found_sdk_version}" sdk_name=$target_platform$use_sdk - use_sdk_path=[`$use_xcodebuild -version -sdk $sdk_name Path`] + + use_sdk_path=$($use_xcodebuild -version -sdk $sdk_name Path 2>&1) + # test if sdk is available to xcodebuild, otherwise error out + valid_sdk=[`echo $use_sdk_path | grep "error:"`] + + if test "x$valid_sdk" != "x"; then + AC_MSG_ERROR("invalid SDK version provided (--with-sdk=$use_sdk) is not available in xcodebuild -showsdks") + fi case $host in x86_64-apple-darwin) @@ -404,7 +411,7 @@ case $host in ;; esac - AX_COMPARE_VERSION([$use_sdk], [ge], [$target_minver], , AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk)) + AX_COMPARE_VERSION([$use_sdk], [ge], [$target_minver], , AC_MSG_ERROR("invalid SDK version provided (--with-sdk=$use_sdk) less than minimum supported ($target_minver)")) platform_min_version="$target_platform-version-min=$target_minver" |