summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2015-03-10 10:44:20 +0100
committerWillem Jan Palenstijn <wjp@usecode.org>2015-03-10 10:44:20 +0100
commit65a607967e71d68ec32f34b7cf61fd8d891cc550 (patch)
treeefdd9125e3c12c8ce000b4db3c812bce6ce8e296
parent8a1001f236cc0d31d24c250e6eb1f0cd1c419ebc (diff)
parent30208e988315c8f576da6848cdc3236413c0cd10 (diff)
downloadastra-65a607967e71d68ec32f34b7cf61fd8d891cc550.tar.gz
astra-65a607967e71d68ec32f34b7cf61fd8d891cc550.tar.bz2
astra-65a607967e71d68ec32f34b7cf61fd8d891cc550.tar.xz
astra-65a607967e71d68ec32f34b7cf61fd8d891cc550.zip
Merge pull request #29 from wjp/optional_boostutf
Improve configure checks for boost
-rw-r--r--build/linux/Makefile.in10
-rw-r--r--build/linux/configure.ac18
2 files changed, 26 insertions, 2 deletions
diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in
index 2d62a17..f647299 100644
--- a/build/linux/Makefile.in
+++ b/build/linux/Makefile.in
@@ -1,6 +1,7 @@
cuda=@HAVECUDA@
matlab=@HAVEMATLAB@
python=@HAVEPYTHON@
+boostutf=@HAVEBOOSTUTF@
MATLAB_ROOT=@MATLAB_ROOT@
@@ -59,6 +60,8 @@ endif
BOOST_CPPFLAGS=
BOOST_LDFLAGS=
+BOOSTUTF_LIBS=@LIBS_BOOSTUTF@
+
CPPFLAGS+=$(BOOST_CPPFLAGS)
LDFLAGS+=$(BOOST_LDFLAGS)
@@ -290,11 +293,16 @@ ifeq ($(cuda),yes)
@rm -f $(*F).linkinfo
endif
+ifeq ($(boostutf),yes)
test.bin: $(ALL_OBJECTS) $(TEST_OBJECTS)
- ./libtool --mode=link $(LD) -o $@ $(LDFLAGS) $(LIBS) $+ -lboost_unit_test_framework
+ ./libtool --mode=link $(LD) -o $@ $(LDFLAGS) $+ $(LIBS) $(BOOSTUTF_LIBS)
test: test.bin
./test.bin
+else
+test:
+ @echo "Tests have been disabled by configure"
+endif
clean:
rm -f $(MATLAB_MEX) libastra.la
diff --git a/build/linux/configure.ac b/build/linux/configure.ac
index 129079c..d9e1f1a 100644
--- a/build/linux/configure.ac
+++ b/build/linux/configure.ac
@@ -53,20 +53,36 @@ AC_CHECK_HEADER(iostream, , AC_MSG_ERROR([No working c++ compiler found]))
AC_MSG_CHECKING([for boost-unit-test-framework])
ASTRA_CHECK_BOOST_UNIT_TEST_FRAMEWORK(-lboost_unit_test_framework-mt, BOOSTUTF=yes_mt, BOOSTUTF=no)
+HAVEBOOSTUTF=no
if test x$BOOSTUTF = xno; then
ASTRA_CHECK_BOOST_UNIT_TEST_FRAMEWORK(-lboost_unit_test_framework, BOOSTUTF=yes, BOOSTUTF=no)
if test x$BOOSTUTF = xno; then
AC_MSG_RESULT(no)
- AC_MSG_ERROR([No boost-unit-test-framework library found])
else
AC_MSG_RESULT([yes, libboost_unit_test_framework])
LIBS_BOOSTUTF="-lboost_unit_test_framework"
+ HAVEBOOSTUTF=yes
fi
else
AC_MSG_RESULT([yes, libboost_unit_test_framework-mt])
LIBS_BOOSTUTF="-lboost_unit_test_framework-mt"
+ HAVEBOOSTUTF=yes
fi
+AC_SUBST(HAVEBOOSTUTF)
+AC_SUBST(LIBS_BOOSTUTF)
+
+BOOSTok=yes
+AC_CHECK_HEADER([boost/lexical_cast.hpp],[],[BOOSTok=no],[])
+AC_CHECK_HEADER([boost/any.hpp],[],[BOOSTok=no],[])
+dnl AC_CHECK_HEADER([boost/thread.hpp],[],[BOOSTok=no],[])
+dnl AC_CHECK_HEADER([boost/bind.hpp],[],[BOOSTok=no],[])
+AC_CHECK_HEADER([boost/static_assert.hpp],[],[BOOSTok=no],[])
+AC_CHECK_HEADER([boost/throw_exception.hpp],[],[BOOSTok=no],[])
+
+if test x$BOOSTok = xno; then
+ AC_MSG_ERROR([boost not found])
+fi
# nvcc, cuda