[MPlayer-dev-eng] configure endian autodetection
Felix Buenemann
atmosfear at users.sourceforge.net
Wed Jul 31 01:35:31 CEST 2002
On Thursday 18 July 2002 02:42, Bertrand Baudet wrote:
> Nobody had a chance to look at this?
> Any comments are welcomed!
it works on my x86 system, I think we should probably push it into cvs and we
can still revert (or find different detection) if it happens not to work eg.
on 64bit cpus.
Btw. in ffmpeg I saw this check, what do you think?
+
+# ---
+# big/little endian test
+cat > $TMPC << EOF
+#include <inttypes.h>
+int main(int argc, char ** argv){
+ volatile uint32_t i=0x01234567;
+ return (*((uint8_t*)(&i))) == 0x67;
+}
+EOF
+
+if $cc -o $TMPO $TMPC 2>/dev/null ; then
+$TMPO && bigendian="yes"
+else
+echo big/little test failed
+fi
> Bertrand
> PS: see previous message fot the patch.
>
> On Monday 15 July 2002 11:24 pm, Bertrand Baudet wrote:
> > I'm compiling mplayer on the Linux playstation 2 dev-kit.
> > The PS2 has a mips based cpu running in little endian mode
> > and the actual configure failed to configure it properly.
> >
> > I changed the configure script to autodetect the byte
> > ordering. Actually, I don't know if the test works for
> > all cpus so if people can test it on different big endian
> > and little endian cpus I will appreciate.
> >
> > Bertrand
--
Best Regards,
Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________
More information about the MPlayer-dev-eng
mailing list