Mercurial > mplayer.hg
changeset 13478:20619c6203a0
detect byte order even for cross-compiling
author | faust3 |
---|---|
date | Sun, 26 Sep 2004 14:49:33 +0000 |
parents | 8e026ebb082f |
children | 734d74563e5b |
files | configure |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Sun Sep 26 14:40:59 2004 +0000 +++ b/configure Sun Sep 26 14:49:33 2004 +0000 @@ -5844,14 +5844,14 @@ 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