autotoolize.diff 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. diff --git a/Doc/Makefile.am b/Doc/Makefile.am
  2. new file mode 100644
  3. --- /dev/null
  4. +++ b/Doc/Makefile.am
  5. @@ -0,0 +1,5 @@
  6. +dist_noinst_DATA = manual.ps
  7. +dist_pdf_DATA = manual.pdf
  8. +
  9. +%.pdf: %.ps
  10. + ps2pdf $<
  11. diff --git a/Graphs/Makefile.am b/Graphs/Makefile.am
  12. new file mode 100644
  13. --- /dev/null
  14. +++ b/Graphs/Makefile.am
  15. @@ -0,0 +1,2 @@
  16. +EXTRA_DIST = 0README
  17. +dist_noinst_DATA = 4elt.graph 4elt.graph.part.10 metis.mesh test.mgraph
  18. diff --git a/Lib/Makefile.am b/Lib/Makefile.am
  19. new file mode 100644
  20. --- /dev/null
  21. +++ b/Lib/Makefile.am
  22. @@ -0,0 +1,61 @@
  23. +pkgincludedir = $(includedir)/metis
  24. +pkginclude_HEADERS = defs.h macros.h metis.h proto.h rename.h struct.h
  25. +
  26. +SRC = \
  27. + balance.c \
  28. + bucketsort.c \
  29. + ccgraph.c \
  30. + coarsen.c \
  31. + compress.c \
  32. + debug.c \
  33. + estmem.c \
  34. + fm.c \
  35. + fortran.c \
  36. + frename.c \
  37. + graph.c \
  38. + initpart.c \
  39. + kmetis.c \
  40. + kvmetis.c \
  41. + kwayfm.c \
  42. + kwayrefine.c \
  43. + kwayvolfm.c \
  44. + kwayvolrefine.c \
  45. + match.c \
  46. + mbalance.c \
  47. + mbalance2.c \
  48. + mcoarsen.c \
  49. + memory.c \
  50. + mesh.c \
  51. + meshpart.c \
  52. + mfm.c \
  53. + mfm2.c \
  54. + mincover.c \
  55. + minitpart.c \
  56. + minitpart2.c \
  57. + mkmetis.c \
  58. + mkwayfmh.c \
  59. + mkwayrefine.c \
  60. + mmatch.c \
  61. + mmd.c \
  62. + mpmetis.c \
  63. + mrefine.c \
  64. + mrefine2.c \
  65. + mutil.c \
  66. + myqsort.c \
  67. + ometis.c \
  68. + parmetis.c \
  69. + pmetis.c \
  70. + pqueue.c \
  71. + refine.c \
  72. + separator.c \
  73. + sfm.c \
  74. + srefine.c \
  75. + stat.c \
  76. + subdomains.c \
  77. + timing.c \
  78. + util.c
  79. +
  80. +lib_LTLIBRARIES = libmetis.la
  81. +libmetis_la_SOURCES = $(SRC)
  82. +libmetis_la_LIBADD = -lm
  83. +libmetis_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION)
  84. diff --git a/Makefile.am b/Makefile.am
  85. new file mode 100644
  86. --- /dev/null
  87. +++ b/Makefile.am
  88. @@ -0,0 +1,5 @@
  89. +SUBDIRS = Lib Programs Graphs Test Doc
  90. +EXTRA_DIST = CHANGES FILES INSTALL LICENSE VERSION
  91. +
  92. +pkgconfigdir = $(libdir)/pkgconfig
  93. +pkgconfig_DATA = metis.pc
  94. diff --git a/Programs/Makefile.am b/Programs/Makefile.am
  95. new file mode 100644
  96. --- /dev/null
  97. +++ b/Programs/Makefile.am
  98. @@ -0,0 +1,23 @@
  99. +AM_CPPFLAGS = -I$(top_srcdir)/Lib
  100. +LDADD = $(top_builddir)/Lib/libmetis.la
  101. +
  102. +bin_PROGRAMS = \
  103. + pmetis \
  104. + kmetis \
  105. + oemetis \
  106. + onmetis \
  107. + mesh2dual \
  108. + mesh2nodal \
  109. + partdmesh \
  110. + partnmesh \
  111. + graphchk
  112. +
  113. +pmetis_SOURCES = pmetis.c io.c
  114. +kmetis_SOURCES = kmetis.c io.c
  115. +oemetis_SOURCES = oemetis.c io.c smbfactor.c
  116. +onmetis_SOURCES = onmetis.c io.c smbfactor.c
  117. +mesh2dual_SOURCES = mesh2dual.c io.c
  118. +mesh2nodal_SOURCES = mesh2nodal.c io.c
  119. +partdmesh_SOURCES = partdmesh.c io.c
  120. +partnmesh_SOURCES = partnmesh.c io.c
  121. +graphchk_SOURCES = graphchk.c io.c
  122. diff --git a/Test/Makefile.am b/Test/Makefile.am
  123. new file mode 100644
  124. --- /dev/null
  125. +++ b/Test/Makefile.am
  126. @@ -0,0 +1,11 @@
  127. +AM_CPPFLAGS = -I$(top_srcdir)/Lib
  128. +LDADD = $(top_builddir)/Lib/libmetis.la
  129. +
  130. +check_PROGRAMS = mtest
  131. +mtest_SOURCES = mtest.c ../Programs/io.c
  132. +
  133. +GRAPHS = \
  134. + ../Graphs/4elt.graph
  135. +
  136. +check-local: $(check_PROGRAMS) $(GRAPHS)
  137. + -./mtest ../Graphs/4elt.graph
  138. diff --git a/configure.ac b/configure.ac
  139. new file mode 100644
  140. --- /dev/null
  141. +++ b/configure.ac
  142. @@ -0,0 +1,40 @@
  143. +# -*- Autoconf -*-
  144. +# Process this file with autoconf to produce a configure script.
  145. +
  146. +AC_PREREQ([2.69])
  147. +AC_INIT([METIS],[4.0.3],[karypis@cs.umn.edu],[metis],[http://glaros.dtc.umn.edu/gkhome/metis/metis/overview])
  148. +AC_CONFIG_SRCDIR([Lib/metis.h])
  149. +AC_CONFIG_HEADERS([config.h])
  150. +AM_INIT_AUTOMAKE([foreign])
  151. +LT_INIT
  152. +
  153. +# Checks for programs.
  154. +AC_PROG_INSTALL
  155. +AC_PROG_CC
  156. +
  157. +LIBS_SAVED=$LIBS
  158. +
  159. +# Checks for libraries.
  160. +AC_CHECK_LIB([m], [sqrt])
  161. +
  162. +# Checks for header files.
  163. +AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
  164. +
  165. +# Checks for typedefs, structures, and compiler characteristics.
  166. +
  167. +# Checks for library functions.
  168. +AC_FUNC_MALLOC
  169. +AC_FUNC_REALLOC
  170. +AC_CHECK_FUNCS([pow sqrt strtol])
  171. +
  172. +LIBS=$LIBS_SAVED
  173. +
  174. +AC_CONFIG_FILES([
  175. + metis.pc
  176. + Makefile
  177. + Doc/Makefile
  178. + Graphs/Makefile
  179. + Lib/Makefile
  180. + Programs/Makefile
  181. + Test/Makefile])
  182. +AC_OUTPUT
  183. diff --git a/metis.pc.in b/metis.pc.in
  184. new file mode 100644
  185. --- /dev/null
  186. +++ b/metis.pc.in
  187. @@ -0,0 +1,12 @@
  188. +prefix=@prefix@
  189. +exec_prefix=@exec_prefix@
  190. +libdir=@libdir@
  191. +includedir=@includedir@
  192. +
  193. +Name: @PACKAGE_NAME@
  194. +Description: Software for partitioning unstructured graphs and meshes
  195. +Version: @PACKAGE_VERSION@
  196. +URL: @PACKAGE_URL@
  197. +Libs: -L${libdir} -lmetis
  198. +Libs.private: -lm
  199. +Cflags: -I${includedir}/metis