summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2007-08-22 20:42:25 +0000
committerMåns Rullgård <mans@mansr.com>2007-08-22 20:42:25 +0000
commit9eebe6873906bad11a352b2e7f2ac3c4805d7a4f (patch)
tree192577df344fdd277d28982842408de3b4efc4b1 /configure
parent81717747abd73f866066c38cb98ba1be7bd82cd6 (diff)
fix endian check when cross-compiling
Originally committed as revision 10187 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 3 insertions, 13 deletions
diff --git a/configure b/configure
index 0db02da308..a9a4fd74ee 100755
--- a/configure
+++ b/configure
@@ -1519,20 +1519,10 @@ EOF
# ---
# big/little-endian test
-if ! enabled cross_compile; then
- check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
-#include <inttypes.h>
-int main(int argc, char ** argv){
- volatile uint32_t i=0x01234567;
- return (*((uint8_t*)(&i))) == 0x67;
-}
+check_cc <<EOF || die "endian test failed"
+unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
EOF
-else
- # programs cannot be launched if cross compiling, so make a static guess
- if test "$arch" = "powerpc" -o "$arch" = "mips" ; then
- bigendian="yes"
- fi
-fi
+strings $TMPO | grep -q BIGE && enable bigendian
# ---
# check availability of some header files