File: configure

package info (click to toggle)
openmsx 17.0-1
  • links: PTS
  • area: main
  • in suites: bookworm, sid
  • size: 22,820 kB
  • sloc: cpp: 163,438; xml: 43,246; tcl: 17,713; python: 5,388; sh: 77; makefile: 38
file content (32 lines) | stat: -rwxr-xr-x 970 bytes parent folder | download | duplicates (5)
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