autotoolize.diff 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. diff --git a/Demo/Makefile.am b/Demo/Makefile.am
  2. new file mode 100644
  3. --- /dev/null
  4. +++ b/Demo/Makefile.am
  5. @@ -0,0 +1,22 @@
  6. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  7. +LDADD = $(top_builddir)/Source/librbio.la $(SUITESPARSECONFIG_LIBS)
  8. +
  9. +EXTRA_DIST = \
  10. + RBdemo.out
  11. +
  12. +# Disable the .out implicit pattern rule. Prevents GNU make from
  13. +# adding bogus dependencies for the .out files listed above.
  14. +%.out: %
  15. +
  16. +check_PROGRAMS = \
  17. + RBdemo
  18. +
  19. +RBdemo_SOURCES = RBdemo.c
  20. +
  21. +RB = \
  22. + $(top_srcdir)/RBio/private/west0479.rua
  23. +
  24. +check-local: $(check_PROGRAMS) $(RB)
  25. + ./RBdemo < $(top_srcdir)/RBio/private/west0479.rua
  26. +
  27. +CLEANFILES = temp.rb
  28. diff --git a/Include/Makefile.am b/Include/Makefile.am
  29. new file mode 100644
  30. --- /dev/null
  31. +++ b/Include/Makefile.am
  32. @@ -0,0 +1 @@
  33. +pkginclude_HEADERS = RBio.h
  34. diff --git a/Makefile.am b/Makefile.am
  35. new file mode 100644
  36. --- /dev/null
  37. +++ b/Makefile.am
  38. @@ -0,0 +1,5 @@
  39. +SUBDIRS = Include Source RBio Demo Tcov
  40. +EXTRA_DIST = README.txt Doc/ChangeLog Doc/License.txt Doc/gpl.txt
  41. +
  42. +pkgconfigdir = $(libdir)/pkgconfig
  43. +pkgconfig_DATA = rbio.pc
  44. diff --git a/RBio/Makefile.am b/RBio/Makefile.am
  45. new file mode 100644
  46. --- /dev/null
  47. +++ b/RBio/Makefile.am
  48. @@ -0,0 +1,3 @@
  49. +SUBDIRS = private
  50. +dist_noinst_DATA = \
  51. + mywest
  52. diff --git a/RBio/private/Makefile.am b/RBio/private/Makefile.am
  53. new file mode 100644
  54. --- /dev/null
  55. +++ b/RBio/private/Makefile.am
  56. @@ -0,0 +1,7 @@
  57. +dist_noinst_DATA = \
  58. + bcsstk01.rb \
  59. + farm.rb \
  60. + lap_25.pse \
  61. + lap_25.rb \
  62. + west0479.rb \
  63. + west0479.rua
  64. diff --git a/Source/Makefile.am b/Source/Makefile.am
  65. new file mode 100644
  66. --- /dev/null
  67. +++ b/Source/Makefile.am
  68. @@ -0,0 +1,18 @@
  69. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  70. +
  71. +RBIOSRC = \
  72. + RBio.c
  73. +
  74. +lib_LTLIBRARIES = librbio.la
  75. +noinst_LTLIBRARIES = librbioi.la librbiol.la
  76. +
  77. +librbioi_la_SOURCES = $(RBIOSRC)
  78. +librbioi_la_LIBADD = $(SUITESPARSECONFIG_LIBS)
  79. +librbioi_la_CPPFLAGS = $(AM_CPPFLAGS) -DINT
  80. +
  81. +librbiol_la_SOURCES = $(RBIOSRC)
  82. +librbiol_la_LIBADD = $(SUITESPARSECONFIG_LIBS)
  83. +
  84. +librbio_la_SOURCES =
  85. +librbio_la_LIBADD = librbioi.la librbiol.la
  86. +librbio_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION)
  87. diff --git a/Tcov/Makefile.am b/Tcov/Makefile.am
  88. new file mode 100644
  89. --- /dev/null
  90. +++ b/Tcov/Makefile.am
  91. @@ -0,0 +1,92 @@
  92. +AM_CC = gcc
  93. +AM_CFLAGS = -O0 -g --coverage
  94. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  95. +LDADD = $(SUITESPARSECONFIG_LIBS)
  96. +
  97. +dist_noinst_DATA = \
  98. + matrices/Tina_DisCog.tar.gz \
  99. + matrices/dwg961a.tar.gz \
  100. + matrices/m4.rb \
  101. + matrices/m4b.rb \
  102. + matrices/mhd1280a.tar.gz \
  103. + matrices/mhd1280b.tar.gz \
  104. + matrices/plskz362.tar.gz \
  105. + matrices/qc324.tar.gz \
  106. + matrices/s4.rb \
  107. + matrices/west0067.tar.gz \
  108. + mangled/1.rb \
  109. + mangled/2.rb \
  110. + mangled/3.rb \
  111. + mangled/4.rb \
  112. + mangled/5.rb \
  113. + mangled/6.rb \
  114. + mangled/7.rb \
  115. + mangled/8.rb \
  116. + mangled/9.rb \
  117. + mangled/10.rb \
  118. + mangled/11.rb \
  119. + mangled/12.rb \
  120. + mangled/13.rb \
  121. + mangled/14.rb \
  122. + mangled/15.rb
  123. +
  124. +check_PROGRAMS = \
  125. + RBdemo \
  126. + RBtest
  127. +
  128. +RBdemo_SOURCES = $(top_srcdir)/Source/RBio.c $(top_srcdir)/Demo/RBdemo.c
  129. +RBtest_SOURCES = $(top_srcdir)/Source/RBio.c RBtest.c
  130. +
  131. +TAR = tar -O -xvvzf
  132. +
  133. +RB = \
  134. + $(top_srcdir)/RBio/private/bcsstk01.rb \
  135. + $(top_srcdir)/RBio/private/farm.rb \
  136. + $(top_srcdir)/RBio/private/lap_25.pse \
  137. + $(top_srcdir)/RBio/private/lap_25.rb \
  138. + $(top_srcdir)/RBio/private/west0479.rb \
  139. + $(top_srcdir)/RBio/private/west0479.rua \
  140. + $(addprefix $(srcdir)/,$(dist_noinst_DATA))
  141. +
  142. +COV = \
  143. + $(top_srcdir)/Source/RBio.c \
  144. + $(top_srcdir)/Demo/RBdemo.c \
  145. + $(srcdir)/RBtest.c
  146. +
  147. +check-local: $(check_PROGRAMS) $(RB) $(COV)
  148. + -./RBdemo $(top_srcdir)/RBio/private/bcsstk01.rb
  149. + -./RBdemo $(top_srcdir)/RBio/private/farm.rb
  150. + -./RBdemo $(top_srcdir)/RBio/private/lap_25.pse
  151. + -./RBdemo $(top_srcdir)/RBio/private/lap_25.rb
  152. + -./RBdemo $(top_srcdir)/RBio/private/west0479.rb
  153. + -./RBdemo $(top_srcdir)/RBio/private/west0479.rua
  154. + -$(TAR) $(srcdir)/matrices/dwg961a.tar.gz dwg961a/dwg961a.rb | ./RBdemo
  155. + -$(TAR) $(srcdir)/matrices/mhd1280a.tar.gz mhd1280a/mhd1280a.rb | ./RBdemo
  156. + -$(TAR) $(srcdir)/matrices/mhd1280b.tar.gz mhd1280b/mhd1280b.rb | ./RBdemo
  157. + -$(TAR) $(srcdir)/matrices/qc324.tar.gz qc324/qc324.rb | ./RBdemo
  158. + -$(TAR) $(srcdir)/matrices/plskz362.tar.gz plskz362/plskz362.rb | ./RBdemo
  159. + -$(TAR) $(srcdir)/matrices/west0067.tar.gz west0067/west0067.rb | ./RBdemo
  160. + -$(TAR) $(srcdir)/matrices/Tina_DisCog.tar.gz Tina_DisCog/Tina_DisCog.rb | ./RBdemo
  161. + -./RBdemo $(srcdir)/matrices/m4.rb
  162. + -./RBdemo $(srcdir)/matrices/s4.rb
  163. + -./RBdemo $(srcdir)/matrices/m4b.rb
  164. + -./RBdemo $(srcdir)/mangled/1.rb
  165. + -./RBdemo $(srcdir)/mangled/2.rb
  166. + -./RBdemo $(srcdir)/mangled/3.rb
  167. + -./RBdemo $(srcdir)/mangled/4.rb
  168. + -./RBdemo $(srcdir)/mangled/5.rb
  169. + -./RBdemo $(srcdir)/mangled/6.rb
  170. + -./RBdemo $(srcdir)/mangled/7.rb
  171. + -./RBdemo $(srcdir)/mangled/8.rb
  172. + -./RBdemo $(srcdir)/mangled/9.rb
  173. + -./RBdemo $(srcdir)/mangled/10.rb
  174. + -./RBdemo $(srcdir)/mangled/11.rb
  175. + -./RBdemo $(srcdir)/mangled/12.rb
  176. + -./RBdemo $(srcdir)/mangled/13.rb
  177. + -./RBdemo $(srcdir)/mangled/14.rb
  178. + -./RBdemo $(srcdir)/mangled/15.rb
  179. + -./RBtest
  180. + -gcov -o $(builddir) $(COV) > gcov.out
  181. + -grep -c "#####" RBio.c.gcov
  182. +
  183. +CLEANFILES = gcov.out *.gcov *.gcda *.gcno temp*.rb
  184. diff --git a/configure.ac b/configure.ac
  185. new file mode 100644
  186. --- /dev/null
  187. +++ b/configure.ac
  188. @@ -0,0 +1,41 @@
  189. +# -*- Autoconf -*-
  190. +# Process this file with autoconf to produce a configure script.
  191. +
  192. +AC_PREREQ([2.69])
  193. +AC_INIT([RBio],[2.2.1],[DrTimothyAldenDavis@gmail.com],[rbio],[http://www.suitesparse.com/])
  194. +AC_CONFIG_SRCDIR([Source/RBio.c])
  195. +AC_CONFIG_HEADERS([config.h])
  196. +AM_INIT_AUTOMAKE([foreign])
  197. +LT_INIT
  198. +
  199. +# Checks for programs.
  200. +AC_PROG_INSTALL
  201. +AC_PROG_CC
  202. +
  203. +LIBS_SAVED=$LIBS
  204. +
  205. +# Checks for libraries.
  206. +PKG_PROG_PKG_CONFIG
  207. +PKG_CHECK_MODULES([SUITESPARSECONFIG],[suitesparseconfig],
  208. + [],
  209. + [AC_MSG_ERROR([cannot find suitesparseconfig])])
  210. +
  211. +# Checks for header files.
  212. +AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
  213. +
  214. +# Checks for typedefs, structures, and compiler characteristics.
  215. +
  216. +# Checks for library functions.
  217. +
  218. +LIBS=$LIBS_SAVED
  219. +
  220. +AC_CONFIG_FILES([
  221. + rbio.pc
  222. + Makefile
  223. + Demo/Makefile
  224. + Include/Makefile
  225. + RBio/Makefile
  226. + RBio/private/Makefile
  227. + Source/Makefile
  228. + Tcov/Makefile])
  229. +AC_OUTPUT
  230. diff --git a/rbio.pc.in b/rbio.pc.in
  231. new file mode 100644
  232. --- /dev/null
  233. +++ b/rbio.pc.in
  234. @@ -0,0 +1,12 @@
  235. +prefix=@prefix@
  236. +exec_prefix=@exec_prefix@
  237. +libdir=@libdir@
  238. +includedir=@includedir@
  239. +
  240. +Name: @PACKAGE_NAME@
  241. +Description: Toolbox for reading/writing sparse matrices in Rutherford/Boeing format
  242. +Version: @PACKAGE_VERSION@
  243. +URL: @PACKAGE_URL@
  244. +Requires.private: suitesparseconfig
  245. +Libs: -L${libdir} -lrbio
  246. +Cflags: -I${includedir}/rbio