0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

detect byte order even for cross-compiling

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13479 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
faust3 2004-09-26 14:49:33 +00:00
parent b815c5c94a
commit 6f0791ded8

12
configure vendored
View File

@ -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