diff options
author | Martin Storsjö <martin@martin.st> | 2017-06-21 16:54:22 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2017-06-21 22:32:52 +0300 |
commit | 333a34da3a6d13155de480e7d16ec5fec7f4cd6c (patch) | |
tree | 4d4a8bb9033c7a8d1ae7655d737ae6ef4883c7ab | |
parent | f519e131c101ae3948dabf1f7f598efbff5fb536 (diff) | |
download | ffmpeg-333a34da3a6d13155de480e7d16ec5fec7f4cd6c.tar.gz |
configure: Automatically add -isysroot for darwin if --sysroot is specified
Check the existing flags in the cc/cflags/cppflags/ldflags for
occurrances of -isysroot; if none is found but --sysroot was specified,
set -isysroot to the same value as --sysroot.
This simplifies configuring cross-builds for iOS, if the global
environment variable SDKROOT isn't set.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rwxr-xr-x | configure | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3981,6 +3981,10 @@ case $target_os in { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; } check_header dispatch/dispatch.h && add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore' + if test -n "$sysroot"; then + is_in -isysroot $cc $CPPFLAGS $CFLAGS || check_cppflags -isysroot $sysroot + is_in -isysroot $ld $LDFLAGS || check_ldflags -isysroot $sysroot + fi ;; msys*) die "Native MSYS builds are discouraged, please use the MINGW environment." |