aboutsummaryrefslogtreecommitdiff
path: root/riscv/riscv.ac
blob: a09926943469fcc300b7e7a29c9cba63521ccf9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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])
])

AC_ARG_WITH([fesvr],
  [AS_HELP_STRING([--with-fesvr],
    [path to your fesvr installation if not in a standard location])],
  [
    LDFLAGS="-L$withval/lib $LDFLAGS"
    CPPFLAGS="-I$withval/include $CPPFLAGS"
  ]
)

AC_CHECK_LIB(fesvr, libfesvr_is_present, [], [AC_MSG_ERROR([libfesvr is required])], [-pthread])

AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([libpthread is required])])

AC_ARG_ENABLE([commitlog], AS_HELP_STRING([--enable-commitlog], [Enable commit log generation]))
AS_IF([test "x$enable_commitlog" = "xyes"], [
  AC_DEFINE([RISCV_ENABLE_COMMITLOG],,[Enable commit log generation])
])

AC_ARG_ENABLE([histogram], AS_HELP_STRING([--enable-histogram], [Enable PC histogram generation]))
AS_IF([test "x$enable_histogram" = "xyes"], [
  AC_DEFINE([RISCV_ENABLE_HISTOGRAM],,[Enable PC histogram generation])
])

AC_ARG_ENABLE([dirty], AS_HELP_STRING([--enable-dirty], [Enable hardware management of PTE accessed and dirty bits]))
AS_IF([test "x$enable_dirty" = "xyes"], [
  AC_DEFINE([RISCV_ENABLE_DIRTY],,[Enable hardware management of PTE accessed and dirty bits])
])