summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 9 insertions, 6 deletions
diff --git a/configure b/configure
index 49b5481139..63f38fa94c 100755
--- a/configure
+++ b/configure
@@ -2365,24 +2365,27 @@ feature_not_found() {
# ---
# big/little endian test
cat > $TMPC << EOF
+#include <stdio.h>
short big_endian[] = { 0x4269, 0x4765, 0x4e64, 0x4961, 0x4e00, 0, };
short little_endian[] = { 0x694c, 0x7454, 0x654c, 0x6e45, 0x6944, 0x6e41, 0, };
-extern int foo(short *, short *);
-int main(int argc, char *argv[]) {
- return foo(big_endian, little_endian);
+int main(int argc, char *argv[])
+{
+ return printf("%s %s\n", (char *)big_endian, (char *)little_endian);
}
EOF
-if compile_object ; then
- if strings -a $TMPO | grep -q BiGeNdIaN ; then
+if compile_prog ; then
+ if strings -a $TMPE | grep -q BiGeNdIaN ; then
bigendian="yes"
- elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
+ elif strings -a $TMPE | grep -q LiTtLeEnDiAn ; then
bigendian="no"
else
echo big/little test failed
+ exit 1
fi
else
echo big/little test failed
+ exit 1
fi
##########################################