aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
authorGravatar faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-09-26 14:49:33 +0000
committerGravatar faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-09-26 14:49:33 +0000
commit6f0791ded8a9b1b75b1475585af57497ceaa438c (patch)
tree205bc669bc60705e0048d8b3a674d1f3ca9e7d6d /configure
parentb815c5c94a295b4e4943c60f706b6b59d39c95e1 (diff)
detect byte order even for cross-compiling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13479 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 6 insertions, 6 deletions
diff --git a/configure b/configure
index 8d2fc671f1..a2308bb554 100755
--- a/configure
+++ b/configure
@@ -5844,14 +5844,14 @@ echores "$_ftp"
echocheck "byte order"
if test "$_big_endian" = auto ; then
cat > $TMPC <<EOF
-#include <inttypes.h>
-int main(void) {
- volatile uint32_t i=0x01234567;
- return (*((uint8_t*)(&i))) == 0x67;
-}
+short asci_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|0)};
+int main(){
+ char* s = (char*)asci_name;
+ return 0;
+}
EOF
if cc_check ; then
- if $TMPO ; then
+ if test `grep -l MPlayer $TMPO` ; then
_big_endian=yes
else
_big_endian=no