Commit 3c728cee authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 323c049c
...@@ -798,6 +798,13 @@ check_cxx(){ ...@@ -798,6 +798,13 @@ check_cxx(){
check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" $CXX_C -o $TMPO $TMPCPP 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(){ check_cpp(){
log check_cpp "$@" log check_cpp "$@"
cat > $TMPC cat > $TMPC
...@@ -951,7 +958,7 @@ check_header_oc(){ ...@@ -951,7 +958,7 @@ check_header_oc(){
{ {
echo "#include <$header>" echo "#include <$header>"
echo "int main(void) { return 0; }" echo "int main(void) { return 0; }"
} | check_cc "-x" "objective-c" "$@" && enable_safe $headers } | check_oc "$@" && enable_safe $headers
} }
check_func(){ check_func(){
...@@ -2977,6 +2984,7 @@ tmpfile TMPC .c ...@@ -2977,6 +2984,7 @@ tmpfile TMPC .c
tmpfile TMPCPP .cpp tmpfile TMPCPP .cpp
tmpfile TMPE $EXESUF tmpfile TMPE $EXESUF
tmpfile TMPH .h tmpfile TMPH .h
tmpfile TMPM .m
tmpfile TMPO .o tmpfile TMPO .o
tmpfile TMPS .S tmpfile TMPS .S
tmpfile TMPSH .sh tmpfile TMPSH .sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment