forked from openMSX/openMSX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·32 lines (30 loc) · 970 Bytes
/
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
#!/bin/sh
# Probes the build environment (libs, headers).
if [ -z "$MAKE" ]
then
# Look for GNU Make; prefer "gmake" over "make".
(false ; echo "nothing:" | make -f - > /dev/null 2>&1) && MAKE=make
(false ; echo "nothing:" | gmake -f - > /dev/null 2>&1) && MAKE=gmake
else
echo "Using value of MAKE environment variable: \"$MAKE\"."
fi
if [ -z "$MAKE" ]
then
echo 'Error: no Make found.'
echo 'Please install GNU Make and put it in your path as "gmake" or "make",'
echo 'or put its location in an environment variable named "MAKE".'
exit 1
fi
if [ "gmake" != "$MAKE" ]
then
if ! ( $MAKE --version > /dev/null 2>&1 \
&& ($MAKE --version 2> /dev/null | grep "GNU Make" > /dev/null) )
then
echo "Error: Make does not appear to be GNU Make."
echo 'Please install GNU Make and put it in your path as "gmake" or "make",'
echo 'or put its location in an environment variable named "MAKE".'
exit 1
fi
fi
# Invoke actual probe.
$MAKE -f build/main.mk probe