aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-09-27 12:23:50 -0300
committerJames Almer <jamrial@gmail.com>2017-09-27 12:23:50 -0300
commite00e8639b22a06b77ada2b906a4b1ccdb373adc1 (patch)
treeff91cd8322c617fbcda7f3552e1669454daa3eaa
parent407a7547dad5c50d0b82db27be4572edc5e9994d (diff)
parent71a49fe25f2e4468fbbadbebef8d073b1b3cc1a5 (diff)
downloadffmpeg-e00e8639b22a06b77ada2b906a4b1ccdb373adc1.tar.gz
Merge commit '71a49fe25f2e4468fbbadbebef8d073b1b3cc1a5'
* commit '71a49fe25f2e4468fbbadbebef8d073b1b3cc1a5': configure: Use cppflags check helper functions where appropriate Merged-by: James Almer <jamrial@gmail.com>
-rwxr-xr-xconfigure14
1 files changed, 4 insertions, 10 deletions
diff --git a/configure b/configure
index a8b1f3fea5..2cd727ea2f 100755
--- a/configure
+++ b/configure
@@ -4816,18 +4816,12 @@ check_cxxflags -std=c++11 || check_cxxflags -std=c++0x
# some compilers silently accept -std=c11, so we also need to check that the
# version macro is defined properly
-if test_cflags_cc -std=c11 ctype.h "__STDC_VERSION__ >= 201112L"; then
- add_cflags -std=c11
-else
+check_cpp_condition ctype.h "__STDC_VERSION__ >= 201112L" -std=c11 &&
+ add_cflags -std=c11 ||
check_cflags -std=c99
-fi
-check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
-#include <stdlib.h>
-EOF
-check_cc -D_LARGEFILE_SOURCE <<EOF && add_cppflags -D_LARGEFILE_SOURCE
-#include <stdlib.h>
-EOF
+check_cppflags -D_FILE_OFFSET_BITS=64
+check_cppflags -D_LARGEFILE_SOURCE
add_host_cppflags -D_ISOC99_SOURCE
check_host_cflags -std=c99