Skip to content

Commit

Permalink
Boost build
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDilthey committed Jul 5, 2017
1 parent 261d5f2 commit 3a3d88e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
@@ -1,4 +1,4 @@
CXXFLAGS += -O3 -DNDEBUG -std=c++11 -Isrc -I @mathinc@
CXXFLAGS += -O3 -DNDEBUG -std=c++11 -Isrc -L @boostlib@ -I @mathinc@
CPPFLAGS += @amcppflags@

UNAME_S=$(shell uname -s)
Expand All @@ -17,7 +17,7 @@ OBJECTS=$(SOURCES:.cpp=.o)
all : mashmap

mashmap : $(OBJECTS)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OBJECTS) -o mashmap @mathlib@ -lstdc++ -lz -lm -lpthread
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OBJECTS) -o mashmap @mathlib@ -lstdc++ -lz -lm -lpthread -lboost_system -lboost_filesystem -lboost_serialization

.SUFFIXES :

Expand Down
19 changes: 12 additions & 7 deletions configure.ac
@@ -1,12 +1,13 @@
AC_INIT(src/map/mash_map.cpp)

AC_ARG_WITH(gsl, [ --with-gsl=<path/to/gsl> GNU Scientific Library install dir (default: /usr/local/)])
AC_ARG_ENABLE(static-gsl, [ --enable-static-gsl])
# AC_ARG_WITH(gsl, [ --with-gsl=<path/to/gsl> GNU Scientific Library install dir (default: /usr/local/)])
# AC_ARG_ENABLE(static-gsl, [ --enable-static-gsl])

if test "$with_gsl" == ""
then
with_gsl=/usr/local/
fi
with_gsl=
# if test "$with_gsl" == ""
# then
# with_gsl=/usr/local/
# fi

AC_ARG_WITH(boost, [ --with-boost=<path/to/boost> Boost Library install dir (will be used instead of GSL)])

Expand All @@ -24,12 +25,14 @@ CPPFLAGS="-std=c++11"

if test "$with_boost" == ""
then
AC_MSG_ERROR([Please specify location of Boost])

CPPFLAGS="-I$with_gsl/include"
AC_CHECK_HEADER(gsl/gsl_cdf.h, [result=1], [result=0])

if test $result == 0
then
AC_MSG_ERROR([GNU Scientific Library headers not found.])
AC_MSG_ERROR([Please specify path to Boost])
fi

if test "x$enable_static_gsl" == "xyes"
Expand All @@ -51,6 +54,8 @@ else

AC_SUBST(mathlib, $with_boost/lib/libboost_math_c99.a)
AC_SUBST(mathinc, $with_boost/include)
AC_SUBST(boostlib, $with_boost/lib)

AC_SUBST(amcppflags, "-DUSE_BOOST")
fi

Expand Down

0 comments on commit 3a3d88e

Please sign in to comment.