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 "$CPP" ; then
30 echo "CPP clean: FALSE"
31 /bin
/echo -e "\n\nYou must run 'unset CPP' so buildroot can run with";
32 /bin
/echo -e "a clean environment on your build machine\n";
37 if test -n "$CXX" ; then
38 echo "CXX clean: FALSE"
39 /bin
/echo -e "\n\nYou must run 'unset CXX' so buildroot can run with";
40 /bin
/echo -e "a clean environment on your build machine\n";
45 if test -n "$GCJ" ; then
46 echo "GCJ clean: FALSE"
47 /bin
/echo -e "\n\nYou must run 'unset GCJ' so buildroot can run with";
48 /bin
/echo -e "a clean environment on your build machine\n";
54 if test -n "$CFLAGS" ; then
55 echo "CFLAGS clean: FALSE"
56 /bin
/echo -e "\n\nYou must run 'unset CFLAGS' so buildroot can run with";
57 /bin
/echo -e "a clean environment on your build machine\n";
60 echo "CFLAGS clean: Ok"
62 if test -n "$INCLUDES" ; then
63 echo "INCLUDES clean: FALSE"
64 /bin
/echo -e "WARNING: INCLUDES contains:\n\t'$INCLUDES'"
66 echo "INCLUDES clean: Ok"
69 if test -n "$CXXFLAGS" ; then
70 echo "CXXFLAGS clean: FALSE"
71 /bin
/echo -e "\n\nYou must run 'unset CXXFLAGS' so buildroot can run with";
72 /bin
/echo -e "a clean environment on your build machine\n";
75 echo "CXXFLAGS clean: Ok"
77 if test -n "$GREP_OPTIONS" ; then
78 echo "GREP_OPTIONS clean: FALSE"
79 /bin
/echo -e "\n\nYou must run 'unset GREP_OPTIONS' so buildroot can run with";
80 /bin
/echo -e "a clean environment on your build machine\n";
84 if test -n "$CROSS_COMPILE" ; then
85 echo "CROSS_COMPILE clean: FALSE"
86 /bin
/echo -e "\n\nYou must run 'unset CROSS_COMPILE' so buildroot can run with";
87 /bin
/echo -e "a clean environment on your build machine\n";
91 if test -n "$ARCH" ; then
92 echo "ARCH clean: FALSE"
93 /bin
/echo -e "\n\nYou must run 'unset ARCH' so buildroot can run with";
94 /bin
/echo -e "a clean environment on your build machine\n";
99 echo "WORKS" |
grep "WORKS" >/dev
/null
2>&1
100 if test $?
!= 0 ; then
101 echo "grep works: FALSE"
105 # sanity check for CWD in LD_LIBRARY_PATH
106 # try not to rely on egrep..
107 if test -n "$LD_LIBRARY_PATH" ; then
108 /bin
/echo TRiGGER_start
"$LD_LIBRARY_PATH"TRiGGER_end |
/bin
/grep ':.:' >/dev
/null
2>&1 ||
109 /bin
/echo TRiGGER_start
"$LD_LIBRARY_PATH"TRiGGER_end |
/bin
/grep 'TRiGGER_start:' >/dev
/null
2>&1 ||
110 /bin
/echo TRiGGER_start
"$LD_LIBRARY_PATH"TRiGGER_end |
/bin
/grep ':TRiGGER_end' >/dev
/null
2>&1 ||
111 /bin
/echo TRiGGER_start
"$LD_LIBRARY_PATH"TRiGGER_end |
/bin
/grep '::' >/dev
/null
2>&1
113 echo "LD_LIBRARY_PATH sane: FALSE"
114 echo "You seem to have the current working directory in your"
115 echo "LD_LIBRARY_PATH environment variable. This doesn't work."
118 echo "LD_LIBRARY_PATH sane: Ok"
124 #############################################################
126 # check build system 'which'
128 #############################################################
129 if ! which which > /dev
/null
; then
130 echo "which installed: FALSE"
131 /bin
/echo -e "\n\nYou must install 'which' on your build machine\n";
134 echo "which installed: Ok"
138 #############################################################
140 # check build system 'sed'
142 #############################################################
143 SED
=$
(toolchain
/dependencies
/check-host-sed.sh
)
145 if [ -z "$SED" ] ; then
146 XSED
=$HOST_SED_DIR/bin
/sed
147 echo "sed works: No, using buildroot version instead"
150 echo "sed works: Ok ($SED)"
156 #############################################################
158 # check build system 'make'
160 #############################################################
161 MAKE
=$
(which make 2> /dev
/null
)
162 if [ -z "$MAKE" ] ; then
163 echo "make installed: FALSE"
164 /bin
/echo -e "\n\nYou must install 'make' on your build machine\n";
167 MAKE_VERSION
=$
($MAKE --version 2>&1 |
$XSED -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
168 if [ -z "$MAKE_VERSION" ] ; then
169 echo "make installed: FALSE"
170 /bin
/echo -e "\n\nYou must install 'make' on your build machine\n";
173 MAKE_MAJOR
=$
(echo $MAKE_VERSION |
$XSED -e "s/\..*//g")
174 MAKE_MINOR
=$
(echo $MAKE_VERSION |
$XSED -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g")
175 if [ $MAKE_MAJOR -lt 3 ] ||
[ $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 80 ] ; then
176 echo "You have make '$MAKE_VERSION' installed. GNU make >=3.80 is required"
179 echo "GNU make version '$MAKE_VERSION': Ok"
183 #############################################################
185 # check build system 'gcc'
187 #############################################################
188 COMPILER
=$
(which $HOSTCC 2> /dev
/null
)
189 if [ -z "$COMPILER" ] ; then
190 COMPILER
=$
(which cc
2> /dev
/null
)
192 if [ -z "$COMPILER" ] ; then
193 echo "C Compiler installed: FALSE"
194 /bin
/echo -e "\n\nYou must install 'gcc' on your build machine\n";
199 COMPILER_VERSION
=$
($COMPILER --version 2>&1 |
$XSED -e 's/^.*(.CC) \([0-9\.]\).*/\1/g' -e "s/[-\ ].*//g" -e '1q')
200 if [ -z "$COMPILER_VERSION" ] ; then
201 echo "gcc installed: FALSE"
202 /bin
/echo -e "\n\nYou must install 'gcc' on your build machine\n";
207 # ignore the version for now
208 COMPILER_MAJOR
=$
(echo $COMPILER_VERSION |
$XSED -e "s/\..*//g")
209 COMPILER_MINOR
=$
(echo $COMPILER_VERSION |
$XSED -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g")
210 if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then
211 echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 2.95 is required"
215 echo "C compiler '$COMPILER'"
216 #echo "C compiler version '$COMPILER_VERSION': Ok"
220 CXXCOMPILER
=$
(which $HOSTCXX 2> /dev
/null
)
221 if [ -z "$CXXCOMPILER" ] ; then
222 CXXCOMPILER
=$
(which c
++ 2> /dev
/null
)
224 if [ -z "$CXXCOMPILER" ] ; then
225 echo "C++ Compiler installed: FALSE"
226 /bin
/echo -e "\nYou may have to install 'g++' on your build machine\n"
229 if [ ! -z "$CXXCOMPILER" ] ; then
230 CXXCOMPILER_VERSION
=$
($CXXCOMPILER --version 2>&1 |
$XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g" -e '1q')
231 if [ -z "$CXXCOMPILER_VERSION" ] ; then
232 echo "c++ installed: FALSE"
233 /bin
/echo -e "\nYou may have to install 'g++' on your build machine\n"
238 # ignore the version for now
239 CXXCOMPILER_MAJOR
=$
(echo $CXXCOMPILER_VERSION |
$XSED -e "s/\..*//g")
240 CXXCOMPILER_MINOR
=$
(echo $CXXCOMPILER_VERSION |
$XSED -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
241 if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
242 echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required"
246 echo "C++ compiler '$CXXCOMPILER'"
247 # echo "C++ compiler version '$CXXCOMPILER_VERSION': Ok"
250 #############################################################
252 # check build system 'bison'
254 #############################################################
255 if ! which bison
> /dev
/null
; then
256 echo "bison installed: FALSE"
257 /bin
/echo -e "\n\nYou must install 'bison' on your build machine\n";
260 echo "bison installed: Ok"
263 #############################################################
265 # check build system 'flex'
267 #############################################################
268 if ! which flex
> /dev
/null
; then
269 echo "flex installed: FALSE"
270 /bin
/echo -e "\n\nYou must install 'flex' on your build machine\n";
273 echo "flex installed: Ok"
275 #############################################################
277 # check build system 'nasm'
279 #############################################################
280 if [ "x$NEED_NASM" = "xy" ]
282 NASM
=$
(toolchain
/dependencies
/check-host-nasm.sh
)
284 if [ -z "$NASM" ] ; then
285 echo "nasm works: No, using buildroot version instead"
287 echo "nasm works: Ok ($NASM)"
291 #############################################################
293 # check build system 'gettext'
295 #############################################################
296 if ! which msgfmt
> /dev
/null
; then \
297 echo "gettext installed: FALSE"
298 /bin
/echo -e "\n\nYou must install 'gettext' on your build machine\n"; \
301 echo "gettext installed: Ok"
304 if ! which makeinfo
> /dev
/null
; then \
305 echo "makeinfo installed: FALSE"
306 /bin
/echo -e "\n\nMost likely some packages will fail to build their documentation"
307 echo "Either install 'makeinfo' on your host or fix the respective packages."
308 echo "Makeinfo can usually be found in the texinfo package for your host."
310 echo "makeinfo installed: Ok"
313 #############################################################
315 # check build system 'ruby' interpreter
317 #############################################################
319 if [ "x$NEED_RUBY" = "xy" ]
321 RUBY
=$
(which ruby
2> /dev
/null
)
322 if [ -z "$RUBY" ] ; then
323 echo "ruby installed: FALSE"
324 /bin
/echo -e "\n\nYou must install 'ruby' on your build machine\n"
329 #############################################################
331 # check build system 'help2man'
333 #############################################################
334 if ! which help2man
> /dev
/null
; then
335 echo "help2man installed: FALSE"
336 /bin
/echo -e "\n\nYou should install 'help2man' on your build machine\n";
337 /bin
/echo "Creating dummy 'help2man' script since missing doesn't work for me"
338 cat > "$HOST_SED_DIR"/bin
/help2man
<<EOF
343 *) echo '.ab help2man is required to generate this page' >> \$1 ;;
347 chmod +x
"$HOST_SED_DIR"/bin
/help2man
350 echo "help2man installed: Ok"
353 #############################################################
357 #############################################################
358 echo "Build system dependencies: Ok"