blob: 41cc865912809f6418c7c36cebd721d7e6122c53 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
--- configure2.orig 2011-10-07 22:20:59.000000000 +0200
+++ configure2 2011-12-12 19:00:42.610336614 +0100
@@ -26,6 +26,7 @@
echo " --help print this message"
echo " --prefix=PREFIX install in PREFIX [$PREFIX]"
echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
+ echo " --libdatadir=DIR install pkgconfig files in DIR [PREFIX/lib/pkgconfig]"
echo " --shlibdir=DIR install shared libs in DIR [PREFIX/lib]"
echo " --incdir=DIR install includes in DIR [PREFIX/include/dvdnav]"
echo " --enable-static build static libraries [default=yes]"
@@ -72,6 +73,8 @@
;;
--libdir=*) libdir="$optval"
;;
+ --libdatadir=*) libdatadir="$optval"
+ ;;
--shlibdir=*) shlibdir="$optval"
;;
--incdir=*) incdir="$optval"
@@ -97,9 +100,10 @@
esac
done
-PREFIX=`cd $PREFIX && pwd`
+#PREFIX=`cd $PREFIX && pwd`
test -z "$libdir" && libdir=$PREFIX/lib
+test -z "$libdatadir" && libdir=$PREFIX/lib/pkgconfig
test -z "$shlibdir" && shlibdir=$PREFIX/lib
test -z "$incdir" && incdir=$PREFIX/include/dvdnav
@@ -123,10 +127,24 @@
;;
esac
+echo -n "Checking if we're big-endian... "
+bigendian=no
+TMPD=`mktemp -d temp.XXXX`
+TMPC=$TMPD/endian.c
+TMPO=$TMPD/endian.o
+cat > $TMPC <<EOF
+unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
+EOF
+$cc $optimizations $cflags -c -o $TMPO $TMPC
+od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && bigendian=yes
+rm -rf $TMPD
+echo "$bigendian"
+
cat > config.mak << EOF
# Automatically generated by configure, do not edit
PREFIX=$PREFIX
libdir=$libdir
+libdatadir=$libdatadir
shlibdir=$shlibdir
incdir=$incdir
THREADLIB=$threadlib
@@ -153,6 +171,12 @@
/* Automatically generated by configure, do not edit */
#include "version.h"
EOF
+if test "$bigendian" = "yes"
+then
+ echo "#define WORDS_BIGENDIAN" >> config.h
+else
+ echo "#undef WORDS_BIGENDIAN" >> config.h
+fi
# build tree in object directory if source path is different from current one
if test "$source_path_used" != "no"; then
|