aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-07-31 07:54:48 +0000
committerMåns Rullgård <mans@mansr.com>2006-07-31 07:54:48 +0000
commitb0cfb663c3cdde6c343c345cbc89f818bf1174a8 (patch)
tree5749b53b337571c211ed0e021483c9cbda9b5ce2 /configure
parenta70c27e813346a11e5fff3d329ecba82fb76826a (diff)
downloadffmpeg-b0cfb663c3cdde6c343c345cbc89f818bf1174a8.tar.gz
can't trust the compiler exit status, check for messages instead
Originally committed as revision 5869 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure b/configure
index c6ec733f43..d3bae10a42 100755
--- a/configure
+++ b/configure
@@ -213,12 +213,16 @@ add_extralibs(){
append extralibs "$@"
}
+check_cmd(){
+ "$@" 2>&1 | tee -a $logfile | { ! grep -q .; }
+}
+
check_cc(){
log check_cc "$@"
cat >$TMPC
log_file $TMPC
log $cc $CFLAGS "$@" -c -o $TMPO $TMPC
- $cc $CFLAGS "$@" -c -o $TMPO $TMPC >>$logfile 2>&1
+ check_cmd $cc $CFLAGS "$@" -c -o $TMPO $TMPC
}
check_cpp(){
@@ -226,14 +230,14 @@ check_cpp(){
cat >$TMPC
log_file $TMPC
log $cc $CFLAGS "$@" -E -o $TMPO $TMPC
- $cc $CFLAGS "$@" -E -o $TMPO $TMPC >>$logfile 2>&1
+ check_cmd $cc $CFLAGS "$@" -E -o $TMPO $TMPC
}
check_ld(){
log check_ld "$@"
check_cc || return
log $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
- $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs >>$logfile 2>&1
+ check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
}
check_cflags(){