Require libdl for dynamic linking at runtime
[riscv-isa-sim.git] / riscv / riscv.ac
1 AC_ARG_WITH([fesvr],
2 [AS_HELP_STRING([--with-fesvr],
3 [path to your fesvr installation if not in a standard location])],
4 [
5 LDFLAGS="-L$withval/lib $LDFLAGS"
6 CFLAGS="-I$withval/include $CFLAGS"
7 ]
8 )
9
10 AC_CHECK_LIB(fesvr, libfesvr_is_present, [], [AC_MSG_ERROR([libfesvr is required])], [-pthread])
11
12 AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([libpthread is required])])
13
14 AC_CHECK_LIB(dl, dlopen, [], [AC_MSG_ERROR([libdl is required])])
15
16 AC_ARG_ENABLE([fpu], AS_HELP_STRING([--disable-fpu], [Disable floating-point]))
17 AS_IF([test "x$enable_fpu" != "xno"], [
18 AC_DEFINE([RISCV_ENABLE_FPU],,[Define if floating-point instructions are supported])
19 ])
20
21 AC_ARG_ENABLE([64bit], AS_HELP_STRING([--disable-64bit], [Disable 64-bit mode]))
22 AS_IF([test "x$enable_64bit" != "xno"], [
23 AC_DEFINE([RISCV_ENABLE_64BIT],,[Define if 64-bit mode is supported])
24 ])
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 ])