summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-05 13:30:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-05 13:30:27 +0200
commit3c728ceec66d4e26a3edbf136a459c271c8452cd (patch)
tree6e6dc0a54a10daa607fab578500963e01dbf15c3 /configure
parent323c049c7e43cb610e3c5ffbe09fc46278808ad5 (diff)
configure: use TMPM in check_header_oc
Some compilers when given -x objective-c will tell that they dont support that but return success. Using a .m file instead returns proper failure in that case This should fix a build failure on freebsd Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure b/configure
index 5ca69c4241..c47fcd2804 100755
--- a/configure
+++ b/configure
@@ -798,6 +798,13 @@ check_cxx(){
check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" $CXX_C -o $TMPO $TMPCPP
}
+check_oc(){
+ log check_oc "$@"
+ cat > $TMPM
+ log_file $TMPM
+ check_cmd $cc $CPPFLAGS $CFLAGS "$@" $CC_C $(cc_o $TMPO) $TMPM
+}
+
check_cpp(){
log check_cpp "$@"
cat > $TMPC
@@ -951,7 +958,7 @@ check_header_oc(){
{
echo "#include <$header>"
echo "int main(void) { return 0; }"
- } | check_cc "-x" "objective-c" "$@" && enable_safe $headers
+ } | check_oc "$@" && enable_safe $headers
}
check_func(){
@@ -2977,6 +2984,7 @@ tmpfile TMPC .c
tmpfile TMPCPP .cpp
tmpfile TMPE $EXESUF
tmpfile TMPH .h
+tmpfile TMPM .m
tmpfile TMPO .o
tmpfile TMPS .S
tmpfile TMPSH .sh