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
|
diff --git a/Doc/Makefile.am b/Doc/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Doc/Makefile.am
@@ -0,0 +1,5 @@
+dist_noinst_DATA = manual.ps
+dist_pdf_DATA = manual.pdf
+
+%.pdf: %.ps
+ ps2pdf $<
diff --git a/Graphs/Makefile.am b/Graphs/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Graphs/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = 0README
+dist_noinst_DATA = 4elt.graph 4elt.graph.part.10 metis.mesh test.mgraph
diff --git a/Lib/Makefile.am b/Lib/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Lib/Makefile.am
@@ -0,0 +1,61 @@
+pkgincludedir = $(includedir)/metis
+pkginclude_HEADERS = defs.h macros.h metis.h proto.h rename.h struct.h
+
+SRC = \
+ balance.c \
+ bucketsort.c \
+ ccgraph.c \
+ coarsen.c \
+ compress.c \
+ debug.c \
+ estmem.c \
+ fm.c \
+ fortran.c \
+ frename.c \
+ graph.c \
+ initpart.c \
+ kmetis.c \
+ kvmetis.c \
+ kwayfm.c \
+ kwayrefine.c \
+ kwayvolfm.c \
+ kwayvolrefine.c \
+ match.c \
+ mbalance.c \
+ mbalance2.c \
+ mcoarsen.c \
+ memory.c \
+ mesh.c \
+ meshpart.c \
+ mfm.c \
+ mfm2.c \
+ mincover.c \
+ minitpart.c \
+ minitpart2.c \
+ mkmetis.c \
+ mkwayfmh.c \
+ mkwayrefine.c \
+ mmatch.c \
+ mmd.c \
+ mpmetis.c \
+ mrefine.c \
+ mrefine2.c \
+ mutil.c \
+ myqsort.c \
+ ometis.c \
+ parmetis.c \
+ pmetis.c \
+ pqueue.c \
+ refine.c \
+ separator.c \
+ sfm.c \
+ srefine.c \
+ stat.c \
+ subdomains.c \
+ timing.c \
+ util.c
+
+lib_LTLIBRARIES = libmetis.la
+libmetis_la_SOURCES = $(SRC)
+libmetis_la_LIBADD = -lm
+libmetis_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION)
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,5 @@
+SUBDIRS = Lib Programs Graphs Test Doc
+EXTRA_DIST = CHANGES FILES INSTALL LICENSE VERSION
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = metis.pc
diff --git a/Programs/Makefile.am b/Programs/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Programs/Makefile.am
@@ -0,0 +1,23 @@
+AM_CPPFLAGS = -I$(top_srcdir)/Lib
+LDADD = $(top_builddir)/Lib/libmetis.la
+
+bin_PROGRAMS = \
+ pmetis \
+ kmetis \
+ oemetis \
+ onmetis \
+ mesh2dual \
+ mesh2nodal \
+ partdmesh \
+ partnmesh \
+ graphchk
+
+pmetis_SOURCES = pmetis.c io.c
+kmetis_SOURCES = kmetis.c io.c
+oemetis_SOURCES = oemetis.c io.c smbfactor.c
+onmetis_SOURCES = onmetis.c io.c smbfactor.c
+mesh2dual_SOURCES = mesh2dual.c io.c
+mesh2nodal_SOURCES = mesh2nodal.c io.c
+partdmesh_SOURCES = partdmesh.c io.c
+partnmesh_SOURCES = partnmesh.c io.c
+graphchk_SOURCES = graphchk.c io.c
diff --git a/Test/Makefile.am b/Test/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Test/Makefile.am
@@ -0,0 +1,11 @@
+AM_CPPFLAGS = -I$(top_srcdir)/Lib
+LDADD = $(top_builddir)/Lib/libmetis.la
+
+check_PROGRAMS = mtest
+mtest_SOURCES = mtest.c ../Programs/io.c
+
+GRAPHS = \
+ ../Graphs/4elt.graph
+
+check-local: $(check_PROGRAMS) $(GRAPHS)
+ -./mtest ../Graphs/4elt.graph
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([METIS],[4.0.3],[karypis@cs.umn.edu],[metis],[http://glaros.dtc.umn.edu/gkhome/metis/metis/overview])
+AC_CONFIG_SRCDIR([Lib/metis.h])
+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([malloc.h stdlib.h string.h strings.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([pow sqrt strtol])
+
+LIBS=$LIBS_SAVED
+
+AC_CONFIG_FILES([
+ metis.pc
+ Makefile
+ Doc/Makefile
+ Graphs/Makefile
+ Lib/Makefile
+ Programs/Makefile
+ Test/Makefile])
+AC_OUTPUT
diff --git a/metis.pc.in b/metis.pc.in
new file mode 100644
--- /dev/null
+++ b/metis.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: Software for partitioning unstructured graphs and meshes
+Version: @PACKAGE_VERSION@
+URL: @PACKAGE_URL@
+Libs: -L${libdir} -lmetis
+Libs.private: -lm
+Cflags: -I${includedir}/metis
|