1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
diff --git a/configure.ac b/configure.ac
index b422caf..dae8647 100644
--- a/configure.ac
+++ b/configure.ac
@@ -333,6 +333,8 @@ else
internal_glpk=no
fi
+PKG_CHECK_MODULES([CS],[cxsparse])
+
# Link time optimization feature in newer gcc/g++
# based on http://svn.r-project.org/R/trunk/configure.ac
AC_ARG_ENABLE([lto],
diff --git a/examples/simple/igraph_sparsemat2.c b/examples/simple/igraph_sparsemat2.c
index 24877c2..0f4b45c 100644
--- a/examples/simple/igraph_sparsemat2.c
+++ b/examples/simple/igraph_sparsemat2.c
@@ -21,7 +21,7 @@
*/
-#include <cs/cs.h>
+#include <cs.h>
#include <igraph.h>
#include "igraph_blas_internal.h"
#include "igraph_arpack_internal.h"
diff --git a/examples/simple/igraph_sparsemat3.c b/examples/simple/igraph_sparsemat3.c
index 09329f0..31d4f1f 100644
--- a/examples/simple/igraph_sparsemat3.c
+++ b/examples/simple/igraph_sparsemat3.c
@@ -21,7 +21,7 @@
*/
-#include <cs/cs.h>
+#include <cs.h>
#include <igraph.h>
int permute(const igraph_matrix_t *M,
diff --git a/examples/simple/igraph_sparsemat4.c b/examples/simple/igraph_sparsemat4.c
index 3a33979..c0ea489 100644
--- a/examples/simple/igraph_sparsemat4.c
+++ b/examples/simple/igraph_sparsemat4.c
@@ -21,7 +21,7 @@
*/
-#include <cs/cs.h>
+#include <cs.h>
#include <igraph.h>
igraph_bool_t check_solution(const igraph_sparsemat_t *A,
diff --git a/src/Makefile.am b/src/Makefile.am
index f9d02d2..8ab3385 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,9 +9,6 @@ AM_YFLAGS = -d
lib_LTLIBRARIES = libigraph.la
-include lapack/blas.inc
-include lapack/lapack.inc
-include lapack/arpack.inc
include plfit/plfit.inc
F2C = f2c/abort_.c f2c/dolio.c f2c/r_sin.c\
@@ -99,8 +96,6 @@ if INTERNAL_ARPACK
ARPACK_LIB = libarpack.la
endif
-include ../optional/glpk/glpk.inc
-
if INTERNAL_GLPK
libglpk_la_SOURCES = $(GLPK)
libglpk_la_CFLAGS = -I$(top_srcdir)/optional/glpk
@@ -365,7 +360,7 @@ SOURCES = basic_query.c games.c cocitation.c iterators.c \
drl_layout_3d.cpp drl_graph_3d.cpp \
DensityGrid_3d.cpp \
foreign-dl-parser.y foreign-dl-lexer.l \
- $(CS) sparsemat.c mixing.c bigint.c bignum.c \
+ sparsemat.c mixing.c bigint.c bignum.c \
version.c optimal_modularity.c \
igraph_fixed_vectorlist.c separators.c \
igraph_marked_queue.c igraph_estack.c st-cuts.c \
@@ -408,7 +403,7 @@ libigraph_la_CXXFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(W
libigraph_la_LDFLAGS = -no-undefined
libigraph_la_LIBADD = -lm $(XML2_LIBS) $(F2C_LIB) $(BLAS_LIB) \
$(LAPACK_LIB) $(ARPACK_LIB) $(GLPK_LIB) $(PRPACK_LIB) \
- $(PLFIT_LIB)
+ $(PLFIT_LIB) $(CS_LIBS)
if INTERNAL_GLPK
libigraph_la_CFLAGS += -I$(top_srcdir)/optional/glpk
diff --git a/src/Makefile.in b/src/Makefile.in
index 56703d4..cc30d48 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -2411,7 +2411,7 @@ SOURCES = basic_query.c games.c cocitation.c iterators.c \
gengraph_powerlaw.cpp gengraph_random.cpp decomposition.c \
bipartite.c drl_layout_3d.cpp drl_graph_3d.cpp \
DensityGrid_3d.cpp foreign-dl-parser.y foreign-dl-lexer.l \
- $(CS) sparsemat.c mixing.c bigint.c bignum.c version.c \
+ sparsemat.c mixing.c bigint.c bignum.c version.c \
optimal_modularity.c igraph_fixed_vectorlist.c separators.c \
igraph_marked_queue.c igraph_estack.c st-cuts.c \
cohesive_blocks.c statusbar.c lapack.c complex.c eigen.c \
diff --git a/src/sparsemat.c b/src/sparsemat.c
index 0ed4678..4fb724d 100644
--- a/src/sparsemat.c
+++ b/src/sparsemat.c
@@ -23,7 +23,7 @@
#include "config.h"
-#include "cs/cs.h"
+#include <cs.h>
#include "igraph_sparsemat.h"
#include "igraph_error.h"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d350f11..31a1f5a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -13,7 +13,7 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
} >$(srcdir)/package.m4
-EXTRA_DIST += package.m4
+#EXTRA_DIST += package.m4
TESTSUITE_AT = \
testsuite.at \
diff --git a/tests/mt.at b/tests/mt.at
index 050974a..b154ce1 100644
--- a/tests/mt.at
+++ b/tests/mt.at
@@ -23,11 +23,11 @@ AT_BANNER([[Thread-safety tests]])
AT_SETUP([Simple error handling test :])
AT_KEYWORDS([thread-safe])
-AT_COMPILE_CHECK([simple/tls1.c], [], [], [], [-lpthread])
+AT_COMPILE_CHECK([simple/tls1.c], [], [], [], [-lpthread $(${PKG_CONFIG} --libs arpack)])
AT_CLEANUP
AT_SETUP([Thread-safe ARPACK:])
AT_KEYWORDS([thread-safe ARPACK])
AT_COMPILE_CHECK([simple/tls2.c], [simple/tls2.out], [], [internal],
- [-lpthread])
+ [-lpthread $(${PKG_CONFIG} --libs arpack)])
AT_CLEANUP
|