File tree 2 files changed +13
-2
lines changed 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 20
20
21
21
INCLUDEDIRS = smithlab_cpp
22
22
INCLUDEARGS = $(addprefix -I, $(INCLUDEDIRS ) )
23
- LIBS = -lgsl -lgslcblas - lz
23
+ LIBS = -lz
24
24
CXX = g++
25
25
CXXFLAGS = -std=c++11 -Wall
26
26
@@ -35,6 +35,11 @@ CXXFLAGS += -DHAVE_HTSLIB
35
35
LIBS += -lhts
36
36
endif
37
37
38
+ ifdef HAVE_GSL
39
+ CXXFLAGS += -DHAVE_GSL
40
+ LIBS += -lgsl -lgslcblas
41
+ endif
42
+
38
43
all : $(PROGS )
39
44
40
45
$(PROGS ) : $(addprefix smithlab_cpp/, \
Original file line number Diff line number Diff line change 18
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
*/
20
20
21
+ #ifdef HAVE_GSL
21
22
#include < gsl/gsl_sf_gamma.h>
22
23
#include < gsl/gsl_vector.h>
23
24
#include < gsl/gsl_matrix.h>
24
25
#include < gsl/gsl_multiroots.h>
25
26
#include < gsl/gsl_linalg.h>
26
27
#include < gsl/gsl_poly.h>
27
28
#include < gsl/gsl_randist.h>
29
+ #endif
28
30
29
31
#include " moment_sequence.hpp"
30
32
35
37
#include < iostream>
36
38
#include < cassert>
37
39
#include < algorithm>
40
+ #include < cmath>
38
41
39
42
using std::string;
40
43
using std::vector;
@@ -45,8 +48,10 @@ using std::setprecision;
45
48
using std::swap;
46
49
using std::find_if;
47
50
using std::transform;
51
+ using std::isfinite;
52
+ using std::isinf;
48
53
49
-
54
+ # ifdef HAVE_GSL
50
55
// ///////////////////////////////////////////////////
51
56
// test Hankel moment matrix
52
57
// ensure moment sequence is positive definite
@@ -110,6 +115,7 @@ ensure_pos_def_mom_seq(vector <double> &moments,
110
115
111
116
return max (hankel_dim - 1 , min_hankel_dim);
112
117
}
118
+ #endif
113
119
114
120
115
121
// ///////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments