a09926943469fcc300b7e7a29c9cba63521ccf9b
[riscv-isa-sim.git] / riscv / riscv.ac
1 AC_LANG_CPLUSPLUS
2
3 AC_ARG_WITH(isa,
4 [AS_HELP_STRING([--with-isa=RV64IMAFDC],
5 [Sets the default RISC-V ISA])],
6 AC_DEFINE_UNQUOTED([DEFAULT_ISA], "$withval", [Default value for --isa switch]),
7 AC_DEFINE_UNQUOTED([DEFAULT_ISA], "RV64IMAFDC", [Default value for --isa switch]))
8
9 AC_SEARCH_LIBS([dlopen], [dl dld], [], [
10 AC_MSG_ERROR([unable to find the dlopen() function])
11 ])
12
13 AC_ARG_WITH([fesvr],
14 [AS_HELP_STRING([--with-fesvr],
15 [path to your fesvr installation if not in a standard location])],
16 [
17 LDFLAGS="-L$withval/lib $LDFLAGS"
18 CPPFLAGS="-I$withval/include $CPPFLAGS"
19 ]
20 )
21
22 AC_CHECK_LIB(fesvr, libfesvr_is_present, [], [AC_MSG_ERROR([libfesvr is required])], [-pthread])
23
24 AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([libpthread is required])])
25
26 AC_ARG_ENABLE([commitlog], AS_HELP_STRING([--enable-commitlog], [Enable commit log generation]))
27 AS_IF([test "x$enable_commitlog" = "xyes"], [
28 AC_DEFINE([RISCV_ENABLE_COMMITLOG],,[Enable commit log generation])
29 ])
30
31 AC_ARG_ENABLE([histogram], AS_HELP_STRING([--enable-histogram], [Enable PC histogram generation]))
32 AS_IF([test "x$enable_histogram" = "xyes"], [
33 AC_DEFINE([RISCV_ENABLE_HISTOGRAM],,[Enable PC histogram generation])
34 ])
35
36 AC_ARG_ENABLE([dirty], AS_HELP_STRING([--enable-dirty], [Enable hardware management of PTE accessed and dirty bits]))
37 AS_IF([test "x$enable_dirty" = "xyes"], [
38 AC_DEFINE([RISCV_ENABLE_DIRTY],,[Enable hardware management of PTE accessed and dirty bits])
39 ])