configure.sh
1.11 KB
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
70
#!/bin/bash
cd $(dirname $(dirname $(readlink -f ${0})))
aclocal
if test $? != 0 ; then
echo "aclocal failed."
exit -1
fi
autoconf
if test $? != 0 ; then
echo "autoconf failed."
exit -1
fi
mkdir -p scripts
automake --add-missing 2> /dev/null | true
export HOST_CC=/usr/bin/gcc
until [ -z "${1}" ]
do
if [ ${1:0:2} = '--' ]; then
tmp=${1:2}
parameter=${tmp%%=*}
parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]")
case $parameter in
32)
rm -f win32.cache
./configure \
--cache-file=win32.cache \
--host=i686-w64-mingw32 \
--prefix=/usr/i686-w64-mingw32/sys-root/mingw \
--libdir=/usr/i686-w64-mingw32/sys-root/mingw/lib
exit $?
;;
64)
rm -f win64.cache
./configure \
--cache-file=win64.cache \
--host=x86_64-w64-mingw32 \
--prefix=/usr/x86_64-w64-mingw32/sys-root/mingw \
--libdir=/usr/x86_64-w64-mingw32/sys-root/mingw/lib
exit $?
;;
ALL)
;;
*)
value=${tmp##*=}
eval $parameter=$value
esac
fi
shift
done
echo "Execute:"
echo " ${0} --32 for 32 bits windows."
echo " ${0} --64 for 64 bits windows."
exit -1