File: configure

package info (click to toggle)
openmsx 0.5.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,976 kB
  • ctags: 10,295
  • sloc: cpp: 63,525; xml: 37,105; sh: 1,403; python: 681; tcl: 207; makefile: 64
file content (33 lines) | stat: -rwxr-xr-x 996 bytes parent folder | download | duplicates (2)
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
33
#!/bin/sh
# $Id: configure,v 1.5 2005/02/25 02:23:09 mthuurne Exp $
# Probes the build environment (libs, headers).

if [ -z "$MAKE" ]
then
	# Look for GNU Make; prefer "gmake" over "make".
	echo "nothing:" | make -f - &> /dev/null && MAKE=make
	echo "nothing:" | gmake -f - &> /dev/null && 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 \
	&& ($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