File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2020
2121INCLUDEDIRS = smithlab_cpp
2222INCLUDEARGS = $(addprefix -I, $(INCLUDEDIRS ) )
23- LIBS = -lgsl -lgslcblas - lz
23+ LIBS = -lz
2424CXX = g++
2525CXXFLAGS = -std=c++11 -Wall
2626
@@ -35,6 +35,11 @@ CXXFLAGS += -DHAVE_HTSLIB
3535LIBS += -lhts
3636endif
3737
38+ ifdef HAVE_GSL
39+ CXXFLAGS += -DHAVE_GSL
40+ LIBS += -lgsl -lgslcblas
41+ endif
42+
3843all : $(PROGS )
3944
4045$(PROGS ) : $(addprefix smithlab_cpp/, \
Original file line number Diff line number Diff line change 1818 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1919 */
2020
21+ #ifdef HAVE_GSL
2122#include < gsl/gsl_sf_gamma.h>
2223#include < gsl/gsl_vector.h>
2324#include < gsl/gsl_matrix.h>
2425#include < gsl/gsl_multiroots.h>
2526#include < gsl/gsl_linalg.h>
2627#include < gsl/gsl_poly.h>
2728#include < gsl/gsl_randist.h>
29+ #endif
2830
2931#include " moment_sequence.hpp"
3032
3537#include < iostream>
3638#include < cassert>
3739#include < algorithm>
40+ #include < cmath>
3841
3942using std::string;
4043using std::vector;
@@ -45,8 +48,10 @@ using std::setprecision;
4548using std::swap;
4649using std::find_if;
4750using std::transform;
51+ using std::isfinite;
52+ using std::isinf;
4853
49-
54+ # ifdef HAVE_GSL
5055// ///////////////////////////////////////////////////
5156// test Hankel moment matrix
5257// ensure moment sequence is positive definite
@@ -110,6 +115,7 @@ ensure_pos_def_mom_seq(vector <double> &moments,
110115
111116 return max (hankel_dim - 1 , min_hankel_dim);
112117}
118+ #endif
113119
114120
115121// ///////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments