summaryrefslogtreecommitdiffstats
path: root/build/linux
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-03-20 11:20:46 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-03-20 11:20:46 +0100
commit1044332131498907bde76400638cfb42b9e4199d (patch)
treea84800b931aeb6f2c5fa83fe5db3b8cbf7f40823 /build/linux
parentd1ad446669cea2a76d7146023e4862a1fdbf3e13 (diff)
parent2d55fd38b4a8ef5076c0591ae4147f81c1107ee3 (diff)
downloadastra-1044332131498907bde76400638cfb42b9e4199d.tar.gz
astra-1044332131498907bde76400638cfb42b9e4199d.tar.bz2
astra-1044332131498907bde76400638cfb42b9e4199d.tar.xz
astra-1044332131498907bde76400638cfb42b9e4199d.zip
Merge branch 'master' into logging
Diffstat (limited to 'build/linux')
-rw-r--r--build/linux/Makefile.in12
-rw-r--r--build/linux/configure.ac31
2 files changed, 41 insertions, 2 deletions
diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in
index 49220df..0dfa15a 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@
@@ -32,6 +33,8 @@ CXXFLAGS+=-g -O3 -Wall -Wshadow
LIBS+=-lpthread
LDFLAGS+=-g
+CPPFLAGS+=@CPPFLAGS_OS@
+
ifeq ($(cuda),yes)
CPPFLAGS += @CPPFLAGS_CUDA@ -DASTRA_CUDA
NVCCFLAGS = @NVCCFLAGS@ @CPPFLAGS_CUDA@ -I../.. -I../../include -DASTRA_CUDA
@@ -57,6 +60,8 @@ endif
BOOST_CPPFLAGS=
BOOST_LDFLAGS=
+BOOSTUTF_LIBS=@LIBS_BOOSTUTF@
+
CPPFLAGS+=$(BOOST_CPPFLAGS)
LDFLAGS+=$(BOOST_LDFLAGS)
@@ -290,11 +295,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 b97a7a0..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
@@ -208,6 +224,19 @@ fi
AC_SUBST(HAVEPYTHON)
+#OS specific setup
+AC_CANONICAL_HOST
+case $host_os in
+ darwin* )
+ CPPFLAGS_OS="-stdlib=libstdc++ -mmacosx-version-min=10.6"
+ ;;
+ *)
+ CPPFLAGS_OS=""
+ ;;
+esac
+
+AC_SUBST(CPPFLAGS_OS)
+
# TODO: