Added commit logging (--enable-commitlog). Also fixed disasm bug.
[riscv-isa-sim.git] / configure
index 4f51f413042237167b6fab0a04818af049e1ba02..9340bfba494b93762aa2baf965fd4257f87c8025 100755 (executable)
--- a/configure
+++ b/configure
@@ -559,7 +559,7 @@ MAKEFLAGS=
 
 # Identity of this package.
 PACKAGE_NAME='RISC-V ISA Simulator'
-PACKAGE_TARNAME='riscv-isa-run'
+PACKAGE_TARNAME='spike'
 PACKAGE_VERSION='?'
 PACKAGE_STRING='RISC-V ISA Simulator ?'
 PACKAGE_BUGREPORT='Andrew Waterman'
@@ -570,7 +570,6 @@ ac_subst_vars='LTLIBOBJS
 LIBOBJS
 subprojects_enabled
 subprojects
-INCDIRS
 EGREP
 GREP
 CPP
@@ -647,10 +646,9 @@ ac_user_opts='
 enable_option_checking
 enable_stow
 enable_optional_subprojects
+with_fesvr
 enable_fpu
 enable_64bit
-enable_rvc
-enable_vec
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1256,7 +1254,7 @@ Fine tuning of the installation directories:
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/riscv-isa-run]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/spike]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1286,8 +1284,12 @@ Optional Features:
                           Enable all optional subprojects
   --disable-fpu           Disable floating-point
   --disable-64bit         Disable 64-bit mode
-  --enable-rvc            Enable instruction compression
-  --disable-vec           Disable vector processor
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-fesvr            path to your fesvr installation if not in a standard
+                          location
 
 Some influential environment variables:
   CC          C compiler command
@@ -4000,9 +4002,9 @@ fi
 # Default compiler flags
 #-------------------------------------------------------------------------
 
-CFLAGS="-Wall -O2"
+CFLAGS="-Wall -O2 -Wno-unused"
 
-CXXFLAGS="-Wall -O2 -Wno-pmf-conversions"
+CXXFLAGS="-Wall -O2 -std=c++0x"
 
 
 #-------------------------------------------------------------------------
@@ -4066,94 +4068,72 @@ $as_echo "$as_me: configuring default subproject : riscv" >&6;}
 
 $as_echo "#define RISCV_ENABLED /**/" >>confdefs.h
 
-      # Check whether --enable-fpu was given.
-if test "${enable_fpu+set}" = set; then :
-  enableval=$enable_fpu;
-fi
-
-if test "x$enable_fpu" != "xno"; then :
-
-
-$as_echo "#define RISCV_ENABLE_FPU /**/" >>confdefs.h
-
 
-fi
+# Check whether --with-fesvr was given.
+if test "${with_fesvr+set}" = set; then :
+  withval=$with_fesvr;
+    LDFLAGS="-L$withval/lib $LDFLAGS"
+    CFLAGS="-I$withval/include $CFLAGS"
 
-# Check whether --enable-64bit was given.
-if test "${enable_64bit+set}" = set; then :
-  enableval=$enable_64bit;
-fi
-
-if test "x$enable_64bit" != "xno"; then :
-
-
-$as_echo "#define RISCV_ENABLE_64BIT /**/" >>confdefs.h
-
-
-fi
 
-# Check whether --enable-rvc was given.
-if test "${enable_rvc+set}" = set; then :
-  enableval=$enable_rvc;
 fi
 
-if test "x$enable_rvc" = "xyes"; then :
 
-
-$as_echo "#define RISCV_ENABLE_RVC /**/" >>confdefs.h
-
-
-fi
-
-# Check whether --enable-vec was given.
-if test "${enable_vec+set}" = set; then :
-  enableval=$enable_vec;
-fi
-
-if test "x$enable_vec" != "xno"; then :
-
-
-$as_echo "#define RISCV_ENABLE_VEC /**/" >>confdefs.h
-
-
-fi
-
-libopc=`dirname \`which riscv-gcc\``/../`$ac_config_guess`/riscv/lib/libopcodes.a
-as_ac_File=`$as_echo "ac_cv_file_$libopc" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $libopc" >&5
-$as_echo_n "checking for $libopc... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfesvr_is_present in -lfesvr" >&5
+$as_echo_n "checking for libfesvr_is_present in -lfesvr... " >&6; }
+if ${ac_cv_lib_fesvr_libfesvr_is_present+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  test "$cross_compiling" = yes &&
-  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$libopc"; then
-  eval "$as_ac_File=yes"
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfesvr  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char libfesvr_is_present ();
+int
+main ()
+{
+return libfesvr_is_present ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_fesvr_libfesvr_is_present=yes
 else
-  eval "$as_ac_File=no"
-fi
+  ac_cv_lib_fesvr_libfesvr_is_present=no
 fi
-eval ac_res=\$$as_ac_File
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$libopc" | $as_tr_cpp` 1
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fesvr_libfesvr_is_present" >&5
+$as_echo "$ac_cv_lib_fesvr_libfesvr_is_present" >&6; }
+if test "x$ac_cv_lib_fesvr_libfesvr_is_present" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBFESVR 1
 _ACEOF
-have_libopcodes="yes"
+
+  LIBS="-lfesvr $LIBS"
+
 else
-  have_libopcodes="no"
+  as_fn_error $? "libfesvr is required" "$LINENO" 5
 fi
 
 
-libbfd="/opt/local/lib/libbfd.dylib"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5
-$as_echo_n "checking for library containing bfd_init... " >&6; }
-if ${ac_cv_search_bfd_init+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_create+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -4163,91 +4143,60 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char bfd_init ();
+char pthread_create ();
 int
 main ()
 {
-return bfd_init ();
+return pthread_create ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' bfd; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_bfd_init=$ac_res
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  ac_cv_lib_pthread_pthread_create=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_bfd_init+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_bfd_init+:} false; then :
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+  LIBS="-lpthread $LIBS"
 
 else
-  ac_cv_search_bfd_init=no
+  as_fn_error $? "libpthread is required" "$LINENO" 5
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5
-$as_echo "$ac_cv_search_bfd_init" >&6; }
-ac_res=$ac_cv_search_bfd_init
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-else
 
-    as_ac_File=`$as_echo "ac_cv_file_$libbfd" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $libbfd" >&5
-$as_echo_n "checking for $libbfd... " >&6; }
-if eval \${$as_ac_File+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  test "$cross_compiling" = yes &&
-  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "$libbfd"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
+# Check whether --enable-fpu was given.
+if test "${enable_fpu+set}" = set; then :
+  enableval=$enable_fpu;
 fi
-eval ac_res=\$$as_ac_File
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
 
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$libbfd" | $as_tr_cpp` 1
-_ACEOF
-libopc="$libopc $libbfd" incopc="/opt/local/include"
-else
-  have_libopcodes="no"
-fi
+if test "x$enable_fpu" != "xno"; then :
 
 
-fi
+$as_echo "#define RISCV_ENABLE_FPU /**/" >>confdefs.h
 
 
-if test "$have_libopcodes" = "no"; then :
+fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find opcodes library" >&5
-$as_echo "$as_me: WARNING: Could not find opcodes library" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Build will not include disassembly support" >&5
-$as_echo "$as_me: WARNING: Build will not include disassembly support" >&2;}
+# Check whether --enable-64bit was given.
+if test "${enable_64bit+set}" = set; then :
+  enableval=$enable_64bit;
+fi
 
-else
+if test "x$enable_64bit" != "xno"; then :
 
-  LIBS="$libopc $LIBS"
-  INCDIRS="-I$incopc"
 
-$as_echo "#define RISCV_HAVE_LIBOPCODES /**/" >>confdefs.h
+$as_echo "#define RISCV_ENABLE_64BIT /**/" >>confdefs.h
 
 
 fi
@@ -4256,7 +4205,6 @@ fi
 
 
 
-
     # Determine if this is a required or an optional subproject