Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added configure option: --with(out)-all-solvers

 - compile with NO solvers is broken, otherwise works properly
  • Loading branch information...
commit 449349d6d2e5a9b1b21c47e1263d66f8d20e22ef 1 parent b6a3c25
@boyle authored
Showing with 20 additions and 7 deletions.
  1. +1 −1  README
  2. +3 −0  TODO
  3. +16 −6 configure.ac
View
2  README
@@ -34,7 +34,7 @@ and would like to install it in your home directory)
If you've used the get_dependancies script then you probably
want to run configure with
- ./configure LDFLAGS="-L$PWD/$(gcc -dumpmachine)/lib -Wl,-rpath,$PWD/$(gcc -dumpmachine)/lib" CPPFLAGS="-I $PWD/$(gcc -dumpmachine)/include" --prefix=$PWD/installed --enable-debug=yes
+ ./configure LDFLAGS="-L$PWD/$(gcc -dumpmachine)/lib -Wl,-rpath,$PWD/$(gcc -dumpmachine)/lib" CPPFLAGS="-I $PWD/$(gcc -dumpmachine)/include" --prefix=$PWD/installed --enable-debug=yes --with-all-solvers
or something similar. The -L and -I directories should be
current locations for the files, while the -rpath should
View
3  TODO
@@ -50,6 +50,9 @@ These are somewhat arranged in order of priority. Highest at the top.
- fix "inline" in matrix.c/h
- extend tests/unit-matrix.c to push things harder
+ - configure:
+ - allow compile with no solvers (--without-all-solvers) (adds requirement for MPI, openMP dependencies)
+
Fix memory leaks:
- Run valgrind. Find bad allocations and uninitialized variables.
View
22 configure.ac
@@ -78,11 +78,12 @@ AC_CONFIG_FILES([Makefile])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
-#AC_OPENMP
# Checks for libraries.
AC_SEARCH_LIBS([load_sparse_matrix], [sparse_matrix_converter],,AC_MSG_ERROR([missing BeBOP sparse matrix I/O library]))
+AC_ARG_WITH(all-solvers, AS_HELP_STRING(--with-all-solvers, Force presence of all solvers))
+
m4_define([MC_WITH_LIB],[
dnl ---------------------------------
@@ -100,22 +101,31 @@ m4_define(MC_EXTRA_FLAGS, $5)
AC_ARG_WITH(MC_LOWERNAME,
AS_HELP_STRING([--without-]MC_LOWERNAME, [Ignore presence of ]MC_FULLNAME[ solver and disable it]))
+dnl force value for all solvers if --with-all-solvers
+AS_IF([test "x$with_all_solvers" = "xyes"],
+ [with_]MC_LOWERNAME[=yes],
+ [test "x$with_all_solvers" = "xno"],
+ [with_]MC_LOWERNAME[=no]
+ )
+
+dnl test for library unless explicitly disabled
MC_EXTRA_CODE
AS_IF([test "x$with_]MC_LOWERNAME[" != "xno"],
[
- AC_SEARCH_LIBS(]MC_FUNC[,]MC_LIB[,have_]MC_LOWERNAME[=yes], [have_]MC_LOWERNAME[=no],MC_EXTRA_FLAGS[)
+ AC_SEARCH_LIBS(]MC_FUNC[,]MC_LIB[,have_]MC_LOWERNAME[=yes,have_]MC_LOWERNAME[=no,]MC_EXTRA_FLAGS[)
],
[have_]MC_LOWERNAME[=no
AC_MSG_CHECKING(for library containing ]MC_FUNC[)
AC_MSG_RESULT(<skipped>)]
)
+dnl if its found, then all good
+dnl if it wasn't found and it was required, then error
AS_IF([test "x$have_]MC_LOWERNAME[" = "xyes"],
[AC_DEFINE(HAVE_]MC_UPPERNAME[,1,]MC_FULLNAME[ solver is available)],
- [AS_IF([test "x$with_]MC_LOWERNAME[" = "xyes"],
- [AC_MSG_ERROR(MC_FULLNAME[ solver requested but not found])
- ])
-])
+ [test "x$with_]MC_LOWERNAME[" = "xyes"],
+ [AC_MSG_ERROR(]MC_FULLNAME[ solver requested but not found)]
+ )
AM_CONDITIONAL([HAVE_]MC_UPPERNAME,[test "x$have_]MC_LOWERNAME[" = "xyes"])
AC_SUBST([have_]MC_LOWERNAME)
Please sign in to comment.
Something went wrong with that request. Please try again.