When autogen.sh finishes it helpfully prints
"Now type 'make' to compile libvirt."
which is fine if on a host with GNU make, but on *BSD running
'make' will end in tears. We should tell users to run 'gmake'
on these platforms. If 'gmake' doesn't exist then we should
report an error too
"GNU make is required to build libvirt"
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
}
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 || {
fi
echo
-echo "Now type 'make' to compile libvirt."
+echo "Now type '$MAKE' to compile libvirt."