From 471a5fe748e0b5c3070ad50cce602417f5a5aad6 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 24 Jan 2014 01:23:08 -0800 Subject: [PATCH] Build and use shared libraries only --- configure | 4 ++-- configure.ac | 3 ++- riscv/riscv.ac | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 1eab8a3..9e22f3c 100755 --- a/configure +++ b/configure @@ -4006,7 +4006,7 @@ fi CFLAGS="-Wall -O2 -Wno-unused" -CXXFLAGS="-Wall -O2 -std=c++0x" +CXXFLAGS="-Wall -O2 -std=c++11" #------------------------------------------------------------------------- @@ -4087,7 +4087,7 @@ if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" +LIBS="-lfesvr -pthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ diff --git a/configure.ac b/configure.ac index 44fd31a..d683cc5 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,7 @@ m4_define( proj_version, [?]) # Setup #------------------------------------------------------------------------- +AC_LANG_CPLUSPLUS AC_INIT(proj_name,proj_version,proj_maintainer,proj_abbreviation) AC_CONFIG_SRCDIR([riscv/common.h]) AC_CONFIG_AUX_DIR([scripts]) @@ -72,7 +73,7 @@ AC_HEADER_STDC #------------------------------------------------------------------------- AC_SUBST([CFLAGS], ["-Wall -O2 -Wno-unused"]) -AC_SUBST([CXXFLAGS],["-Wall -O2 -std=c++0x"]) +AC_SUBST([CXXFLAGS],["-Wall -O2 -std=c++11"]) #------------------------------------------------------------------------- # MCPPBS subproject list diff --git a/riscv/riscv.ac b/riscv/riscv.ac index 36a5b6f..a65039b 100644 --- a/riscv/riscv.ac +++ b/riscv/riscv.ac @@ -7,9 +7,9 @@ AC_ARG_WITH([fesvr], ] ) -AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([libpthread is required])]) +AC_CHECK_LIB(fesvr, libfesvr_is_present, [], [AC_MSG_ERROR([libfesvr is required])], [-pthread]) -AC_CHECK_LIB(fesvr, libfesvr_is_present, [], [AC_MSG_ERROR([libfesvr is required])]) +AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([libpthread is required])]) AC_ARG_ENABLE([fpu], AS_HELP_STRING([--disable-fpu], [Disable floating-point])) AS_IF([test "x$enable_fpu" != "xno"], [ -- 2.30.2