OXYGENHUB
◆ main openmsx / configure
970 B · executable · last changed chore(): initial commit 1 month ago source blame history raw
1
#!/bin/sh
2
# Probes the build environment (libs, headers).
3
4
if [ -z "$MAKE" ]
5
then
6
	# Look for GNU Make; prefer "gmake" over "make".
7
	(false ; echo "nothing:" | make -f - > /dev/null 2>&1) && MAKE=make
8
	(false ; echo "nothing:" | gmake -f - > /dev/null 2>&1) && MAKE=gmake
9
else
10
	echo "Using value of MAKE environment variable: \"$MAKE\"."
11
fi
12
if [ -z "$MAKE" ]
13
then
14
	echo 'Error: no Make found.'
15
	echo 'Please install GNU Make and put it in your path as "gmake" or "make",'
16
	echo 'or put its location in an environment variable named "MAKE".'
17
	exit 1
18
fi
19
if [ "gmake" != "$MAKE" ]
20
then
21
	if ! ( $MAKE --version > /dev/null 2>&1 \
22
	&& ($MAKE --version 2> /dev/null | grep "GNU Make" > /dev/null) )
23
	then
24
		echo "Error: Make does not appear to be GNU Make."
25
		echo 'Please install GNU Make and put it in your path as "gmake" or "make",'
26
		echo 'or put its location in an environment variable named "MAKE".'
27
		exit 1
28
	fi
29
fi
30
31
# Invoke actual probe.
32
$MAKE -f build/main.mk probe