6 echo "Checking build system dependencies:"
9 #############################################################
11 # check build system 'environment'
13 #############################################################
14 if test -n "$BUILDROOT_DL_DIR" ; then
15 /bin
/echo -e "Overriding \$(DL_DIR) in '.config'. Ok"
16 /bin
/echo -e "External download directory: Ok ($BUILDROOT_DL_DIR)"
18 echo "BUILDROOT_DL_DIR clean: Ok"
21 if test -n "$CC" ; then
22 echo "CC clean: FALSE"
23 /bin
/echo -e "\n\nYou must run 'unset CC' so buildroot can run with";
24 /bin
/echo -e "a clean environment on your build machine\n";
29 if test -n "$CXX" ; then
30 echo "CXX clean: FALSE"
31 /bin
/echo -e "\n\nYou must run 'unset CXX' so buildroot can run with";
32 /bin
/echo -e "a clean environment on your build machine\n";
38 if test -n "$CPP" ; then
39 echo "CPP clean: FALSE"
40 /bin
/echo -e "\n\nYou must run 'unset CPP' so buildroot can run with";
41 /bin
/echo -e "a clean environment on your build machine\n";
47 if test -n "$CFLAGS" ; then
48 echo "CFLAGS clean: FALSE"
49 /bin
/echo -e "\n\nYou must run 'unset CFLAGS' so buildroot can run with";
50 /bin
/echo -e "a clean environment on your build machine\n";
53 echo "CFLAGS clean: Ok"
55 if test -n "$INCLUDES" ; then
56 echo "INCLUDES clean: FALSE"
57 /bin
/echo -e "WARNING: INCLUDES contains:\n\t'$INCLUDES'"
59 echo "INCLUDES clean: Ok"
62 if test -n "$CXXFLAGS" ; then
63 echo "CXXFLAGS clean: FALSE"
64 /bin
/echo -e "\n\nYou must run 'unset CXXFLAGS' so buildroot can run with";
65 /bin
/echo -e "a clean environment on your build machine\n";
68 echo "CXXFLAGS clean: Ok"
70 if test -n "$GREP_OPTIONS" ; then
71 echo "GREP_OPTIONS clean: FALSE"
72 /bin
/echo -e "\n\nYou must run 'unset GREP_OPTIONS' so buildroot can run with";
73 /bin
/echo -e "a clean environment on your build machine\n";
77 if test -n "$CROSS_COMPILE" ; then
78 echo "CROSS_COMPILE clean: FALSE"
79 /bin
/echo -e "\n\nYou must run 'unset CROSS_COMPILE' so buildroot can run with";
80 /bin
/echo -e "a clean environment on your build machine\n";
84 if test -n "$ARCH" ; then
85 echo "ARCH clean: FALSE"
86 /bin
/echo -e "\n\nYou must run 'unset ARCH' so buildroot can run with";
87 /bin
/echo -e "a clean environment on your build machine\n";
92 echo "WORKS" |
grep "WORKS" >/dev
/null
2>&1
93 if test $?
!= 0 ; then
94 echo "grep works: FALSE"
98 # sanity check for CWD in LD_LIBRARY_PATH
99 # try not to rely on egrep..
100 if test -n "$LD_LIBRARY_PATH" ; then
101 /bin
/echo TRiGGER_start
"$LD_LIBRARY_PATH"TRiGGER_end |
/bin
/grep ':.:' >/dev
/null
2>&1 ||
102 /bin
/echo TRiGGER_start
"$LD_LIBRARY_PATH"TRiGGER_end |
/bin
/grep 'TRiGGER_start:' >/dev
/null
2>&1 ||
103 /bin
/echo TRiGGER_start
"$LD_LIBRARY_PATH"TRiGGER_end |
/bin
/grep ':TRiGGER_end' >/dev
/null
2>&1 ||
104 /bin
/echo TRiGGER_start
"$LD_LIBRARY_PATH"TRiGGER_end |
/bin
/grep '::' >/dev
/null
2>&1
106 echo "LD_LIBRARY_PATH sane: FALSE"
107 echo "You seem to have the current working directory in your"
108 echo "LD_LIBRARY_PATH environment variable. This doesn't work."
111 echo "LD_LIBRARY_PATH sane: Ok"
117 #############################################################
119 # check build system 'which'
121 #############################################################
122 if ! which which > /dev
/null
; then
123 echo "which installed: FALSE"
124 /bin
/echo -e "\n\nYou must install 'which' on your build machine\n";
127 echo "which installed: Ok"
131 #############################################################
133 # check build system 'sed'
135 #############################################################
136 SED
=$
(toolchain
/dependencies
/check-host-sed.sh
)
138 if [ -z "$SED" ] ; then
139 XSED
=$HOST_SED_DIR/bin
/sed
140 echo "sed works: No, using buildroot version instead"
143 echo "sed works: Ok ($SED)"
149 #############################################################
151 # check build system 'make'
153 #############################################################
154 MAKE
=$
(which make 2> /dev
/null
)
155 if [ -z "$MAKE" ] ; then
156 echo "make installed: FALSE"
157 /bin
/echo -e "\n\nYou must install 'make' on your build machine\n";
160 MAKE_VERSION
=$
($MAKE --version 2>&1 |
$XSED -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
161 if [ -z "$MAKE_VERSION" ] ; then
162 echo "make installed: FALSE"
163 /bin
/echo -e "\n\nYou must install 'make' on your build machine\n";
166 MAKE_MAJOR
=$
(echo $MAKE_VERSION |
$XSED -e "s/\..*//g")
167 MAKE_MINOR
=$
(echo $MAKE_VERSION |
$XSED -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g")
168 if [ $MAKE_MAJOR -lt 3 ] ||
[ $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 80 ] ; then
169 echo "You have make '$MAKE_VERSION' installed. GNU make >=3.80 is required"
172 echo "GNU make version '$MAKE_VERSION': Ok"
176 #############################################################
178 # check build system 'gcc'
180 #############################################################
181 COMPILER
=$
(which $HOSTCC 2> /dev
/null
)
182 if [ -z "$COMPILER" ] ; then
183 COMPILER
=$
(which cc
2> /dev
/null
)
185 if [ -z "$COMPILER" ] ; then
186 echo "C Compiler installed: FALSE"
187 /bin
/echo -e "\n\nYou must install 'gcc' on your build machine\n";
192 COMPILER_VERSION
=$
($COMPILER --version 2>&1 |
$XSED -e 's/^.*(.CC) \([0-9\.]\).*/\1/g' -e "s/[-\ ].*//g" -e '1q')
193 if [ -z "$COMPILER_VERSION" ] ; then
194 echo "gcc installed: FALSE"
195 /bin
/echo -e "\n\nYou must install 'gcc' on your build machine\n";
200 # ignore the version for now
201 COMPILER_MAJOR
=$
(echo $COMPILER_VERSION |
$XSED -e "s/\..*//g")
202 COMPILER_MINOR
=$
(echo $COMPILER_VERSION |
$XSED -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g")
203 if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then
204 echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 2.95 is required"
208 echo "C compiler '$COMPILER'"
209 #echo "C compiler version '$COMPILER_VERSION': Ok"
213 CXXCOMPILER
=$
(which $HOSTCXX 2> /dev
/null
)
214 if [ -z "$CXXCOMPILER" ] ; then
215 CXXCOMPILER
=$
(which c
++ 2> /dev
/null
)
217 if [ -z "$CXXCOMPILER" ] ; then
218 echo "C++ Compiler installed: FALSE"
219 /bin
/echo -e "\nYou may have to install 'g++' on your build machine\n"
222 if [ ! -z "$CXXCOMPILER" ] ; then
223 CXXCOMPILER_VERSION
=$
($CXXCOMPILER --version 2>&1 |
$XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g" -e '1q')
224 if [ -z "$CXXCOMPILER_VERSION" ] ; then
225 echo "c++ installed: FALSE"
226 /bin
/echo -e "\nYou may have to install 'g++' on your build machine\n"
231 # ignore the version for now
232 CXXCOMPILER_MAJOR
=$
(echo $CXXCOMPILER_VERSION |
$XSED -e "s/\..*//g")
233 CXXCOMPILER_MINOR
=$
(echo $CXXCOMPILER_VERSION |
$XSED -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
234 if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
235 echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required"
239 echo "C++ compiler '$CXXCOMPILER'"
240 # echo "C++ compiler version '$CXXCOMPILER_VERSION': Ok"
243 #############################################################
245 # check build system 'bison'
247 #############################################################
248 if ! which bison
> /dev
/null
; then
249 echo "bison installed: FALSE"
250 /bin
/echo -e "\n\nYou must install 'bison' on your build machine\n";
253 echo "bison installed: Ok"
256 #############################################################
258 # check build system 'flex'
260 #############################################################
261 if ! which flex
> /dev
/null
; then
262 echo "flex installed: FALSE"
263 /bin
/echo -e "\n\nYou must install 'flex' on your build machine\n";
266 echo "flex installed: Ok"
268 #############################################################
270 # check build system 'nasm'
272 #############################################################
273 if [ "x$NEED_NASM" = "xy" ]
275 NASM
=$
(toolchain
/dependencies
/check-host-nasm.sh
)
277 if [ -z "$NASM" ] ; then
278 echo "nasm works: No, using buildroot version instead"
280 echo "nasm works: Ok ($NASM)"
284 #############################################################
286 # check build system 'gettext'
288 #############################################################
289 if ! which msgfmt
> /dev
/null
; then \
290 echo "gettext installed: FALSE"
291 /bin
/echo -e "\n\nYou must install 'gettext' on your build machine\n"; \
294 echo "gettext installed: Ok"
297 if ! which makeinfo
> /dev
/null
; then \
298 echo "makeinfo installed: FALSE"
299 /bin
/echo -e "\n\nMost likely some packages will fail to build their documentation"
300 echo "Either install 'makeinfo' on your host or fix the respective packages."
301 echo "Makeinfo can usually be found in the texinfo package for your host."
303 echo "makeinfo installed: Ok"
306 #############################################################
308 # check build system 'ruby' interpreter
310 #############################################################
312 if [ "x$NEED_RUBY" = "xy" ]
314 RUBY
=$
(which ruby
2> /dev
/null
)
315 if [ -z "$RUBY" ] ; then
316 echo "ruby installed: FALSE"
317 /bin
/echo -e "\n\nYou must install 'ruby' on your build machine\n"
322 #############################################################
324 # check build system 'help2man'
326 #############################################################
327 if ! which help2man
> /dev
/null
; then
328 echo "help2man installed: FALSE"
329 /bin
/echo -e "\n\nYou should install 'help2man' on your build machine\n";
330 /bin
/echo "Creating dummy 'help2man' script since missing doesn't work for me"
331 cat > "$HOST_SED_DIR"/bin
/help2man
<<EOF
336 *) echo '.ab help2man is required to generate this page' >> \$1 ;;
340 chmod +x
"$HOST_SED_DIR"/bin
/help2man
343 echo "help2man installed: Ok"
346 #############################################################
350 #############################################################
351 echo "Build system dependencies: Ok"