diff --git a/autogen.sh b/autogen.sh index d5d836aa71..1183b13083 100755 --- a/autogen.sh +++ b/autogen.sh @@ -175,6 +175,19 @@ if test "$OBJ_DIR"; then } fi +# Make sure we can find GNU make and tell the user +# the right command to run +MAKE= +for cmd in make gmake; do + if $cmd -v 2>&1 | grep -q "GNU Make"; then + MAKE=$cmd + break + fi +done +test "$MAKE" || { + die "GNU make is required to build libvirt" +} + if test -z "$*" && test -z "$extra_args" && test -f config.status; then echo "Running config.status..." ./config.status --recheck || { @@ -193,4 +206,4 @@ else fi echo -echo "Now type 'make' to compile libvirt." +echo "Now type '$MAKE' to compile libvirt."