From cb721c596392cbbaa63137ea292dc928a07992af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 6 Aug 2014 01:05:50 +0200 Subject: [PATCH] Add a nasm test for ELF generation We should probably only test this when targetting x86 arch... --- configure | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure b/configure index 14dd49c1b0..39e976a013 100755 --- a/configure +++ b/configure @@ -760,6 +760,18 @@ if [ $HOST_PLATFORM = "darwin" ]; then HOST_EXTENDED_REGEX_SED="sed -E" fi +# check if nasm can actually output ELF files +# (the stock version in OSX can't) +# XXX: should probably only test for x86* arch +if [ "$("$HAIKU_NASM" -hf | grep -c ELF'[36][24]\s')" -ne "2" ]; then + echo "$HAIKU_NASM cannot generate ELF files. Please install a working version." + if [ $HOST_PLATFORM = "darwin" ]; then + echo "You can install it from Mac Ports." + echo "Mac Ports is available at: http://www.macports.org/" + fi + exit 1 +fi + # create output directory mkdir -p "$buildOutputDir" || exit 1