summaryrefslogtreecommitdiff
path: root/libraries/CSparse/autotoolize.diff
blob: 5fa2b8564384e0957f2d961a7463495a53558d69 (plain)
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
diff --git a/Demo/Makefile.am b/Demo/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Demo/Makefile.am
@@ -0,0 +1,46 @@
+AM_CPPFLAGS = -I$(top_srcdir)/Include
+LDADD = $(top_builddir)/Source/libcsparse.la
+
+EXTRA_DIST = \
+	README.txt \
+	cs_demo.out
+
+# Disable the .out implicit pattern rule.  Prevents GNU make from
+# adding bogus dependencies for the .out files listed above.
+%.out: %
+
+noinst_HEADERS = \
+	cs_demo.h
+
+check_PROGRAMS = \
+	cs_demo1 \
+	cs_demo2 \
+	cs_demo3
+
+cs_demo1_SOURCES = cs_demo1.c
+cs_demo2_SOURCES = cs_demo2.c cs_demo.c
+cs_demo3_SOURCES = cs_demo3.c cs_demo.c
+
+MATRICES = \
+	$(top_srcdir)/Matrix/ash219 \
+	$(top_srcdir)/Matrix/bcsstk01 \
+	$(top_srcdir)/Matrix/bcsstk01 \
+	$(top_srcdir)/Matrix/bcsstk16 \
+	$(top_srcdir)/Matrix/fs_183_1 \
+	$(top_srcdir)/Matrix/lp_afiro \
+	$(top_srcdir)/Matrix/mbeacxc \
+	$(top_srcdir)/Matrix/t1 \
+	$(top_srcdir)/Matrix/west0067
+
+check-local: $(check_PROGRAMS) $(MATRICES)
+	-./cs_demo1 < $(top_srcdir)/Matrix/t1
+	-./cs_demo2 < $(top_srcdir)/Matrix/t1
+	-./cs_demo2 < $(top_srcdir)/Matrix/ash219
+	-./cs_demo2 < $(top_srcdir)/Matrix/bcsstk01
+	-./cs_demo2 < $(top_srcdir)/Matrix/fs_183_1
+	-./cs_demo2 < $(top_srcdir)/Matrix/mbeacxc
+	-./cs_demo2 < $(top_srcdir)/Matrix/west0067
+	-./cs_demo2 < $(top_srcdir)/Matrix/lp_afiro
+	-./cs_demo2 < $(top_srcdir)/Matrix/bcsstk16
+	-./cs_demo3 < $(top_srcdir)/Matrix/bcsstk01
+	-./cs_demo3 < $(top_srcdir)/Matrix/bcsstk16
diff --git a/Include/Makefile.am b/Include/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Include/Makefile.am
@@ -0,0 +1 @@
+pkginclude_HEADERS = cs.h
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,5 @@
+SUBDIRS = Include Source Matrix Demo
+EXTRA_DIST = README.txt Doc/ChangeLog Doc/License.txt Doc/lesser.txt
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = csparse.pc
diff --git a/Matrix/Makefile.am b/Matrix/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Matrix/Makefile.am
@@ -0,0 +1,11 @@
+dist_noinst_DATA = \
+	ash219 \
+	bcsstk01 \
+	bcsstk16 \
+	fs_183_1 \
+	ibm32a \
+	ibm32b \
+	lp_afiro \
+	mbeacxc \
+	t1 \
+	west0067
diff --git a/Source/Makefile.am b/Source/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Source/Makefile.am
@@ -0,0 +1,62 @@
+AM_CPPFLAGS = -I$(top_srcdir)/Include
+
+EXTRA_DIST = \
+	README.txt
+
+CSPARSESRC = \
+	cs_add.c \
+	cs_amd.c \
+	cs_chol.c \
+	cs_cholsol.c \
+	cs_compress.c \
+	cs_counts.c \
+	cs_cumsum.c \
+	cs_dfs.c \
+	cs_dmperm.c \
+	cs_droptol.c \
+	cs_dropzeros.c \
+	cs_dupl.c \
+	cs_entry.c \
+	cs_ereach.c \
+	cs_etree.c \
+	cs_fkeep.c \
+	cs_gaxpy.c \
+	cs_happly.c \
+	cs_house.c \
+	cs_ipvec.c \
+	cs_leaf.c \
+	cs_load.c \
+	cs_lsolve.c \
+	cs_ltsolve.c \
+	cs_lu.c \
+	cs_lusol.c \
+	cs_malloc.c \
+	cs_maxtrans.c \
+	cs_multiply.c \
+	cs_norm.c \
+	cs_permute.c \
+	cs_pinv.c \
+	cs_post.c \
+	cs_print.c \
+	cs_pvec.c \
+	cs_qr.c \
+	cs_qrsol.c \
+	cs_randperm.c \
+	cs_reach.c \
+	cs_scatter.c \
+	cs_scc.c \
+	cs_schol.c \
+	cs_spsolve.c \
+	cs_sqr.c \
+	cs_symperm.c \
+	cs_tdfs.c \
+	cs_transpose.c \
+	cs_updown.c \
+	cs_usolve.c \
+	cs_util.c \
+	cs_utsolve.c
+
+lib_LTLIBRARIES = libcsparse.la
+libcsparse_la_SOURCES = $(CSPARSESRC)
+libcsparse_la_LIBADD = -lm
+libcsparse_la_LDFLAGS = -no-undefined -version-number 3:1:2
diff --git a/configure.ac b/configure.ac
new file mode 100644
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,40 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([CSparse],[3.1.2],[DrTimothyAldenDavis@gmail.com],[csparse],[http://www.suitesparse.com/])
+AC_CONFIG_SRCDIR([Source/cs_print.c])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+
+# Checks for programs.
+AC_PROG_INSTALL
+AC_PROG_CC
+
+LIBS_SAVED=$LIBS
+
+# Checks for libraries.
+AC_CHECK_LIB([m], [sqrt])
+
+# Checks for header files.
+AC_CHECK_HEADERS([limits.h stddef.h stdlib.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([sqrt])
+
+LIBS=$LIBS_SAVED
+
+AC_CONFIG_FILES([
+	csparse.pc
+	Makefile
+	Demo/Makefile
+	Include/Makefile
+	Matrix/Makefile
+	Source/Makefile])
+AC_OUTPUT
diff --git a/csparse.pc.in b/csparse.pc.in
new file mode 100644
--- /dev/null
+++ b/csparse.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: A concise sparse matrix package
+Version: @PACKAGE_VERSION@
+URL: @PACKAGE_URL@
+Libs: -L${libdir} -lcsparse
+Libs.private: -lm
+Cflags: -I${includedir}/csparse