2a8ee539817b0b7c5b22c96ec96a7eaf0e45110d
[riscv-isa-sim.git] / riscv / riscv.ac
1 AC_LANG_CPLUSPLUS
2
3 AC_SEARCH_LIBS([dlopen], [dl dld], [], [
4 AC_MSG_ERROR([unable to find the dlopen() function])
5 ])
6
7 AC_ARG_WITH([fesvr],
8 [AS_HELP_STRING([--with-fesvr],
9 [path to your fesvr installation if not in a standard location])],
10 [
11 LDFLAGS="-L$withval/lib $LDFLAGS"
12 CPPFLAGS="-I$withval/include $CPPFLAGS"
13 ]
14 )
15
16 AC_CHECK_LIB(fesvr, libfesvr_is_present, [], [AC_MSG_ERROR([libfesvr is required])], [-pthread])
17
18 AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([libpthread is required])])
19
20 AC_ARG_ENABLE([commitlog], AS_HELP_STRING([--enable-commitlog], [Enable commit log generation]))
21 AS_IF([test "x$enable_commitlog" = "xyes"], [
22 AC_DEFINE([RISCV_ENABLE_COMMITLOG],,[Enable commit log generation])
23 ])
24
25 AC_ARG_ENABLE([histogram], AS_HELP_STRING([--enable-histogram], [Enable PC histogram generation]))
26 AS_IF([test "x$enable_histogram" = "xyes"], [
27 AC_DEFINE([RISCV_ENABLE_HISTOGRAM],,[Enable PC histogram generation])
28 ])