forked from dosemu2/dosemu2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault-configure
executable file
·108 lines (96 loc) · 2.52 KB
/
default-configure
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#! /bin/sh
srcdir="`dirname "$0"`"
CONF_FILE="$srcdir"/compiletime-settings
if [ "$1" != "" ]; then
if [ "${1#--}" = "$1" -a "${1#*=}" = "$1" ]; then
CONF_FILE=$1
if [ "$CONF_FILE" = "-d" ]; then
CONF_FILE="$srcdir"/compiletime-settings.devel
fi
shift
fi
fi
if [ ! -f $CONF_FILE ]; then
echo "$CONF_FILE cannot be opened"
exit 1
fi
SUFFIX=""
while [ "$#" != "0" ]; do
case "$1" in
--enable-plugin*)
EXTRA_PLUGINS="$EXTRA_PLUGINS,${1#*=}"
;;
*)
SUFFIX="$SUFFIX $1"
;;
esac
shift
done
CONF=`cat $CONF_FILE`
CONF=`echo -n "$CONF"| sed '/^config {/d' | sed '/^}/d' | tr '\n' ' ' `
set $CONF
#echo "$*"
STRING=""
PLUGIN=`cat $srcdir/plugin_list | sed 's/$/,/g' | tr -d '\n' | sed 's/,$//'`
while [ "$1" != "" ]; do
# echo "$1 $2"
case "$1" in
experimental)
if [ "$2" = "on" ]; then STRING="$STRING --enable-experimental"; fi
;;
debug)
if [ "$2" = "on" ]; then STRING="$STRING --enable-debug"; fi
;;
asan)
if [ "$2" = "on" ]; then STRING="$STRING --enable-asan"; fi
;;
system-wa)
if [ "$2" = "off" ]; then STRING="$STRING --disable-system-wa"; fi
;;
dlplugins)
if [ "$2" = "off" ]; then STRING="$STRING --disable-dlplugins"; fi
;;
x11fontdir|syshdimagedir)
STRING="$STRING --with-$1=$2"
;;
fdtarball)
STRING="$STRING --with-$1=`realpath "$srcdir"/$2`"
;;
docdir|mandir|datadir|libdir|sysconfdir|bindir|prefix)
STRING="$STRING --$1=`echo $2`"
;;
target_bits)
if [ "$2" != "auto" ]; then
if uname -m | grep -q 64; then
otherbits=64
if cpp -dM /dev/null | grep -q __x86_64__; then
otherbits=32
fi
if [ "$2" = "$otherbits" ]; then
STRING="$STRING --with-target-bits=$otherbits";
fi
elif [ "$2" = "64" ]; then
# cross compilation on pure 32-bit machines
STRING="$STRING --with-target-bits=64 --host=x86_64-pc-linux-gnu";
fi
fi
;;
target_cpu)
if [ "$2" != "auto" ]; then STRING="$STRING --with-target-cpu=$2"; fi
;;
plugin_*)
plugin=${1#plugin_}
if [ "$2" = "on" ]; then PLUGIN="$PLUGIN,$plugin"; fi
if [ "$2" = "off" ]; then
PLUGIN=`echo "$PLUGIN" | sed s/$plugin//`;
fi
;;
*)
;;
esac
shift; shift;
done
[ -f "$srcdir"/configure ] || "$srcdir"/autogen.sh || exit $?
STRING="$STRING --enable-plugins=$PLUGIN,$EXTRA_PLUGINS"
echo exec "$srcdir"/configure $STRING $SUFFIX
eval exec "$srcdir"/configure $STRING $SUFFIX