From 48ffb6aca9257eba5de4e5cc1a623e8278d9ee9b Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Tue, 20 Sep 2011 18:46:19 +0000 Subject: [PATCH] CppUnitLite can be installed along with gtsam with configure flag --enable-install-cppunitlite --- CppUnitLite/Makefile.am | 13 +++++++++++-- configure.ac | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CppUnitLite/Makefile.am b/CppUnitLite/Makefile.am index 931d5a7be..3e4dbdb05 100644 --- a/CppUnitLite/Makefile.am +++ b/CppUnitLite/Makefile.am @@ -7,7 +7,16 @@ headers = TestHarness.h sources = Failure.cpp SimpleString.cpp Test.cpp TestRegistry.cpp TestResult.cpp headers += $(sources:.cpp=.h) -CppUnitLitedir = $(pkgincludedir)/CppUnitLite -noinst_LIBRARIES = libCppUnitLite.a +if ENABLE_INSTALL_CPPUNITLITE +CppUnitLitedir = $(includedir)/CppUnitLite +lib_LIBRARIES = libCppUnitLite.a +CppUnitLite_HEADERS = $(headers) libCppUnitLite_a_SOURCES = $(sources) +else +noinst_LIBRARIES = libCppUnitLite.a noinst_HEADERS = $(headers) +libCppUnitLite_a_SOURCES = $(sources) +endif + + + diff --git a/configure.ac b/configure.ac index 168546e3c..e5ea19f5d 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,17 @@ AC_ARG_ENABLE([serialization], AM_CONDITIONAL([ENABLE_SERIALIZATION], [test x$serialization = xtrue]) +# enable installation of CppUnitLite with gtsam +AC_ARG_ENABLE([install_cppunitlite], + [ --enable-install-cppunitlite Enable installation of CppUnitLite], + [case "${enableval}" in + yes) install_cppunitlite=true ;; + no) install_cppunitlite=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-install-cppunitlite]) ;; + esac],[install_cppunitlite=false]) + +AM_CONDITIONAL([ENABLE_INSTALL_CPPUNITLITE], [test x$install_cppunitlite = xtrue]) + # Checks for programs. AC_PROG_CXX AC_PROG_CC @@ -102,16 +113,6 @@ AX_BOOST_BASE([1.40]) # ]) #AC_SUBST([toolbox]) -# ask for boost directory -#AC_ARG_WITH([boost], -# [AS_HELP_STRING([--with-boost], -# [specify the boost directory for installation (mandatory)])], -# [boost=$withval], -# [AC_MSG_FAILURE( -# [--with-boost has to be specified]) -# ]) -#AC_SUBST([boost]) - AC_CONFIG_FILES([CppUnitLite/Makefile \ gtsam/3rdparty/Makefile \ gtsam/base/Makefile \