-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·146 lines (129 loc) · 3.09 KB
/
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/sh
#
# Copyright 2009, Pier Luigi Fiorini.
# Distributed under the terms of the MIT License.
#
# Authors:
# Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
#
current_dir=`pwd`
defines=""
# Binaries
jambin=`which jam`
rcbin=`which rc`
xresbin=`which xres`
settypebin=`which settype`
mimesetbin=`which mimeset`
setversionbin=`which setversion`
copyattrbin=`which copyattr`
# Check operating system
platform=`uname -s`
release=`uname -r`
echo -n "Checking operating system... "
case "$platform" in
BeOS)
case "$release" in
4.*)
echo "*** BeOS R4 is not supported!"
exit 1
;;
5.*)
echo "*** BeOS R5 is not supported!"
exit 1
;;
6.*)
echo "*** Zeta is not supported!"
exit 1
;;
*)
echo "*** Unsupported BeOS platform!"
exit 1
;;
esac
;;
Haiku)
defines="HAIKU_TARGET_PLATFORM_HAIKU=1"
;;
*)
echo "*** Unsupported $platform operating system!"
exit 1
;;
esac
echo "$platform $release"
# Check whether jam exists
echo -n "Checking whether jam exists... "
if [ -z "$jambin" ]; then
echo "not found"
echo "*** Caya requires jam, please read our Build.txt file."
exit 1
else
echo "found"
fi
# Check for rc
echo -n "Checking for rc... "
if [ -z "$rcbin" ]; then
echo "not found"
exit 1
fi
echo $rcbin
# Check for xres
echo -n "Checking for xres..."
if [ -z "$xresbin" ]; then
echo "not found"
exit 1
fi
echo $xresbin
# Check for settype
echo -n "Checking for settype..."
if [ -z "$settypebin" ]; then
echo "not found"
exit 1
fi
echo $settypebin
# Check for mimeset
echo -n "Checking for mimeset..."
if [ -z "$mimesetbin" ]; then
echo "not found"
exit 1
fi
echo $mimesetbin
# Check for setverion
echo -n "Checking for setversion..."
if [ -z "$setversionbin" ]; then
echo "not found"
exit 1
fi
echo $setversionbin
# Check for copyattr
echo -n "Checking for copyattr..."
if [ -z "$copyattrbin" ]; then
echo "not found"
exit 1
fi
echo $copyattrbin
# Create the build configuration
mkdir -p $current_dir/generated
cat > $current_dir/generated/BuildConfig << EOF
RC = ${rcbin} ;
XRES = ${xresbin} ;
SETTYPE = ${settypebin} ;
MIMESET = ${mimesetbin} ;
SETVERSION = ${setversionbin} ;
COPYATTR = ${copyattrbin} ;
COMMON_BIN_DIRECTORY = $(finddir B_SYSTEM_BIN_DIRECTORY) ;
COMMON_INCLUDE_DIRECTORY = $(finddir B_SYSTEM_HEADERS_DIRECTORY) ;
COMMON_LIB_DIRECTORY = $(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib ;
COMMON_SERVERS_DIRECTORY = $(finddir B_SYSTEM_SERVERS_DIRECTORY) ;
COMMON_ADDONS_DIRECTORY = $(finddir B_SYSTEM_ADDONS_DIRECTORY) ;
COMMON_DEVELOP_DIRECTORY = $(finddir B_SYSTEM_DEVELOP_DIRECTORY) ;
USER_CONFIG_DIRECTORY = $(finddir B_USER_CONFIG_DIRECTORY) ;
USER_INCLUDE_DIRECTORY = $(finddir B_USER_HEADERS_DIRECTORY) ;
USER_LIB_DIRECTORY = $(finddir B_USER_DEVELOP_DIRECTORY)/lib ;
SYSTEM_DIRECTORY = $(finddir B_SYSTEM_DIRECTORY) ;
SYSTEM_LIB_DIRECTORY = $(finddir B_SYSTEM_LIB_DIRECTORY) ;
BEOS_PREFERENCES_DIRECTORY = $(finddir B_BEOS_PREFERENCES_DIRECTORY) ;
PREFERENCES_DIRECTORY = $(finddir B_PREFERENCES_DIRECTORY) ;
USER_PREFERENCES_DIRECTORY = $(finddir B_USER_CONFIG_DIRECTORY)/be/Preferences ;
DEFINES += ${defines} ;
EOF
echo "Configuration done."