Allow configuration of default ISA with --with-isa
[riscv-isa-sim.git] / riscv / riscv.ac
index 2a8ee539817b0b7c5b22c96ec96a7eaf0e45110d..7b48be64d800bf9b6fd914004909431226e7609c 100644 (file)
@@ -1,5 +1,11 @@
 AC_LANG_CPLUSPLUS
 
+AC_ARG_WITH(isa,
+       [AS_HELP_STRING([--with-isa=RV64IMAFDC],
+               [Sets the default RISC-V ISA])],
+  AC_DEFINE_UNQUOTED([DEFAULT_ISA], "$withval", [Default value for --isa switch]),
+  AC_DEFINE_UNQUOTED([DEFAULT_ISA], "RV64IMAFDC", [Default value for --isa switch]))
+
 AC_SEARCH_LIBS([dlopen], [dl dld], [], [
   AC_MSG_ERROR([unable to find the dlopen() function])
 ])