Use AC_CHECK_TOOL for as and allow configure parameter.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 22 Aug 2019 14:23:08 +0000 (14:23 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Thu, 22 Aug 2019 14:24:09 +0000 (14:24 +0000)
This way we auto-detect a cross-assembler more easily with, e.g.,
--build=aarch64--netbsd.

src/microcode/configure.ac
src/microcode/makegen/Makefile.in.in

index f4a98cf42bb83a84e446a6799eeb332c3fe8f199..49f78a39640e8f561a1c7aed3487f3075dad819c 100644 (file)
@@ -180,6 +180,7 @@ SAVED_CFLAGS=${CFLAGS}
 SAVED_LDFLAGS=${LDFLAGS}
 
 dnl Checks for programs.
+AC_CHECK_TOOL(AS, as)
 AC_PROG_CC
 AC_PROG_CC_STDC
 if test "x${ac_cv_prog_cc_c99}" != xno; then
@@ -272,6 +273,15 @@ CCLD=${CC}
 MIT_SCHEME_NATIVE_CODE([${enable_native_code}],[${host_cpu}])
 MIT_SCHEME_COMPILER_TARGET([${with_compiler_target}])
 
+case $mit_scheme_native_code in
+c|svm1-be|svm1-le);;
+*)
+    if test "x${AS}" = x; then
+        AC_MSG_ERROR([Unable to find assembler for native code interface])
+    fi
+    ;;
+esac
+
 AUXDIR_NAME=mit-scheme-${mit_scheme_native_code}
 EXE_NAME=mit-scheme-${mit_scheme_native_code}
 
index aafac46b403beb13efd0f0f59d509b0c084b6ae2..0b19ba0e3c1b0ff6ad8839d42f0528bf3c512499 100644 (file)
@@ -72,7 +72,7 @@ CC = @CC@
 HOST_CC = @HOST_CC@
 CCLD = @CCLD@
 M4 = $(srcdir)/makegen/m4.sh @M4@
-AS = as
+AS = @AS@
 TAR = tar
 GZIP_ENV = --best