autoconfiscate.diff 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405
  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,162 @@
  6. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS)
  7. +
  8. +EXTRA_DIST = \
  9. + umfpack_di_demo.out \
  10. + umfpack_dl_demo.out \
  11. + umfpack_zi_demo.out \
  12. + umfpack_zl_demo.out \
  13. + umf4.out \
  14. + umf4hb.out \
  15. + umf4hb64.out \
  16. + umf4zhb.out
  17. +
  18. +# Disable the .out implicit pattern rule. Prevents GNU make from
  19. +# adding bogus dependencies for the .out files listed above.
  20. +%.out: %
  21. +
  22. +SIMPLE = \
  23. + umfpack_simple
  24. +
  25. +DEMO = \
  26. + umfpack_di_demo \
  27. + umfpack_dl_demo \
  28. + umfpack_zi_demo \
  29. + umfpack_zl_demo
  30. +
  31. +READHB = \
  32. + readhb \
  33. + readhb_nozeros \
  34. + readhb_size
  35. +
  36. +UMF4 = \
  37. + umf4
  38. +
  39. +UMF4HB = \
  40. + umf4hb \
  41. + umf4hb64 \
  42. + umf4zhb
  43. +
  44. +HB = \
  45. + HB/arc130.rua \
  46. + HB/can_24.psa \
  47. + HB/fs_183_6.rua \
  48. + HB/qc324.cua \
  49. + HB/west0067.rua
  50. +
  51. +umfpack_%_demo.c: umfpack_xx_demo.c umfpack_%_demo.sed
  52. + -sed -f umfpack_$*_demo.sed < umfpack_xx_demo.c > umfpack_$*_demo.c
  53. +
  54. +dist_noinst_DATA = \
  55. + umfpack_xx_demo.c \
  56. + umfpack_di_demo.sed \
  57. + umfpack_dl_demo.sed \
  58. + umfpack_zi_demo.sed \
  59. + umfpack_zl_demo.sed \
  60. + $(HB)
  61. +
  62. +dist_noinst_SCRIPTS = \
  63. + dodefault \
  64. + dospd
  65. +
  66. +check_PROGRAMS = \
  67. + $(SIMPLE) \
  68. + $(DEMO) \
  69. + $(READHB) \
  70. + $(UMF4) \
  71. + $(UMF4HB)
  72. +
  73. +check_LTLIBRARIES = \
  74. + libumf4_f77wrapper.la \
  75. + libumf4_f77zwrapper.la \
  76. + libumf4_f77wrapper64.la \
  77. + libumf4_f77zwrapper64.la
  78. +
  79. +umfpack_simple_SOURCES = umfpack_simple.c
  80. +umfpack_simple_LDADD = $(top_builddir)/Source/libumfpack.la
  81. +
  82. +umfpack_di_demo_SOURCES = umfpack_di_demo.c
  83. +umfpack_di_demo_LDADD = $(top_builddir)/Source/libumfpack.la
  84. +
  85. +umfpack_dl_demo_SOURCES = umfpack_dl_demo.c
  86. +umfpack_dl_demo_LDADD = $(top_builddir)/Source/libumfpack.la
  87. +
  88. +umfpack_zi_demo_SOURCES = umfpack_zi_demo.c
  89. +umfpack_zi_demo_LDADD = $(top_builddir)/Source/libumfpack.la
  90. +
  91. +umfpack_zl_demo_SOURCES = umfpack_zl_demo.c
  92. +umfpack_zl_demo_LDADD = $(top_builddir)/Source/libumfpack.la
  93. +
  94. +readhb_SOURCES = readhb.f
  95. +
  96. +readhb_nozeros_SOURCES = readhb_nozeros.f
  97. +
  98. +readhb_size_SOURCES = readhb_size.f
  99. +
  100. +umf4_SOURCES = umf4.c
  101. +umf4_LDADD = $(top_builddir)/Source/libumfpack.la $(AMD_LIBS)
  102. +
  103. +umf4hb_SOURCES = umf4hb.f
  104. +umf4hb_LDADD = libumf4_f77wrapper.la
  105. +
  106. +umf4zhb_SOURCES = umf4zhb.f
  107. +umf4zhb_LDADD = libumf4_f77zwrapper.la
  108. +
  109. +umf4hb64_SOURCES = umf4hb64.f
  110. +umf4hb64_LDADD = libumf4_f77wrapper64.la
  111. +
  112. +libumf4_f77wrapper_la_SOURCES = umf4_f77wrapper.c
  113. +libumf4_f77wrapper_la_LIBADD = $(top_builddir)/Source/libumfpack.la
  114. +libumf4_f77wrapper_la_CPPFLAGS = $(AM_CPPFLAGS)
  115. +
  116. +libumf4_f77zwrapper_la_SOURCES = umf4_f77zwrapper.c
  117. +libumf4_f77zwrapper_la_LIBADD = $(top_builddir)/Source/libumfpack.la
  118. +libumf4_f77zwrapper_la_CPPFLAGS = $(AM_CPPFLAGS)
  119. +
  120. +libumf4_f77wrapper64_la_SOURCES = umf4_f77wrapper.c
  121. +libumf4_f77wrapper64_la_LIBADD = $(top_builddir)/Source/libumfpack.la
  122. +libumf4_f77wrapper64_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  123. +
  124. +libumf4_f77zwrapper64_la_SOURCES = umf4_f77zwrapper.c
  125. +libumf4_f77zwrapper64_la_LIBADD = $(top_builddir)/Source/libumfpack.la
  126. +libumf4_f77zwrapper64_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG
  127. +
  128. +check-local: $(SIMPLE) $(DEMO) $(DEMO:=.out) $(READHB) $(HB) $(UMF4) $(UMF4HB) $(UMF4HB:=.out)
  129. + ./umfpack_simple
  130. + ./umfpack_di_demo > my_umfpack_di_demo.out
  131. + -diff -u $(srcdir)/umfpack_di_demo.out my_umfpack_di_demo.out
  132. + ./umfpack_dl_demo > my_umfpack_dl_demo.out
  133. + -diff -u $(srcdir)/umfpack_dl_demo.out my_umfpack_dl_demo.out
  134. + ./umfpack_zi_demo > my_umfpack_zi_demo.out
  135. + -diff -u $(srcdir)/umfpack_zi_demo.out my_umfpack_zi_demo.out
  136. + ./umfpack_zl_demo > my_umfpack_zl_demo.out
  137. + -diff -u $(srcdir)/umfpack_zl_demo.out my_umfpack_zl_demo.out
  138. + -$(MKDIR_P) tmp
  139. + -./readhb_nozeros < $(srcdir)/HB/can_24.psa > tmp/A
  140. + -./readhb_size < $(srcdir)/HB/can_24.psa > tmp/Asize
  141. + -./umf4
  142. + -./readhb_nozeros < $(srcdir)/HB/west0067.rua > tmp/A
  143. + -./readhb_size < $(srcdir)/HB/west0067.rua > tmp/Asize
  144. + -./umf4
  145. + -./readhb_nozeros < $(srcdir)/HB/fs_183_6.rua > tmp/A
  146. + -./readhb_size < $(srcdir)/HB/fs_183_6.rua > tmp/Asize
  147. + -./umf4
  148. + -./readhb < $(srcdir)/HB/fs_183_6.rua > tmp/A
  149. + -./readhb_size < $(srcdir)/HB/fs_183_6.rua > tmp/Asize
  150. + -./umf4
  151. + -./readhb < $(srcdir)/HB/arc130.rua > tmp/A
  152. + -./readhb_size < $(srcdir)/HB/arc130.rua > tmp/Asize
  153. + -./umf4
  154. + -./readhb_nozeros < $(srcdir)/HB/arc130.rua > tmp/A
  155. + -./readhb_size < $(srcdir)/HB/arc130.rua > tmp/Asize
  156. + -./umf4
  157. + -./readhb_nozeros < $(srcdir)/HB/arc130.rua > tmp/A
  158. + -./readhb_size < $(srcdir)/HB/arc130.rua > tmp/Asize
  159. + -./umf4 a 1e-6
  160. + -./umf4hb < $(srcdir)/HB/west0067.rua > my_umf4hb.out
  161. + -diff -u $(srcdir)/umf4hb.out my_umf4hb.out
  162. + -./umf4zhb < $(srcdir)/HB/qc324.cua > my_umf4zhb.out
  163. + -diff -u $(srcdir)/umf4zhb.out my_umf4zhb.out
  164. + -./umf4hb64 < $(srcdir)/HB/west0067.rua > my_umf4hb64.out
  165. + -diff -u $(srcdir)/umf4hb64.out my_umf4hb64.out
  166. +
  167. +CLEANFILES = my_*.out *.umf tmp/* tmp
  168. diff --git a/Doc/Makefile.am b/Doc/Makefile.am
  169. new file mode 100644
  170. --- /dev/null
  171. +++ b/Doc/Makefile.am
  172. @@ -0,0 +1,101 @@
  173. +EXTRA_DIST = \
  174. + ChangeLog \
  175. + License.txt \
  176. + gpl.txt
  177. +
  178. +dist_noinst_DATA = \
  179. + UMFPACK_QuickStart.tex \
  180. + UserGuide.bib \
  181. + UserGuide.sed1 \
  182. + UserGuide.sed2 \
  183. + UMFPACK_UserGuide.stex
  184. +
  185. +dist_pdf_DATA = \
  186. + UMFPACK_QuickStart.pdf \
  187. + UMFPACK_UserGuide.pdf
  188. +
  189. +# Unlike UserGuide.sed1, use \input{filename.tex} to insert the source code
  190. +# which we will construct below. Also remove the \begin{verbatim} and
  191. +# \end{verbatim} on the adjacent lines and add them to filename.tex.
  192. +define sed1 =
  193. +sed -e ':more;$$!N;s/\n/&/2;t enough;$$!b more;:enough;/^\\begin{verbatim}\nINCLUDE umfpack\(.*\)\.\([ch]\) via sed\n\\end{verbatim}$$/s//\\input{\1_\2.tex}/;P;D' $< > $@
  194. +endef
  195. +
  196. +# UserGuide.sed2 currently strips out C-style comments. In some cases it
  197. +# strips out too much due to formatting; we'll leave that for upstream to fix.
  198. +define sed2 =
  199. +echo '\begin{verbatim}' > $@
  200. +sed -e '/[/][*]/d' -e '/[*][/]/d' < $< | expand -8 >> $@
  201. +echo '\end{verbatim}' >> $@
  202. +endef
  203. +
  204. +UMFPACK_UserGuide.tex: $(srcdir)/UMFPACK_UserGuide.stex
  205. + $(sed1)
  206. +
  207. +_simple_c.tex: $(top_srcdir)/Demo/umfpack_simple.c
  208. + $(sed2)
  209. +%_h.tex: $(top_srcdir)/Include/umfpack%.h
  210. + $(sed2)
  211. +
  212. +SRC = \
  213. + _simple_c.tex \
  214. + _col_to_triplet_h.tex \
  215. + _defaults_h.tex \
  216. + _free_numeric_h.tex \
  217. + _free_symbolic_h.tex \
  218. + _get_determinant_h.tex \
  219. + _get_lunz_h.tex \
  220. + _get_numeric_h.tex \
  221. + _get_symbolic_h.tex \
  222. + _load_numeric_h.tex \
  223. + _load_symbolic_h.tex \
  224. + _numeric_h.tex \
  225. + _qsymbolic_h.tex \
  226. + _report_control_h.tex \
  227. + _report_info_h.tex \
  228. + _report_matrix_h.tex \
  229. + _report_numeric_h.tex \
  230. + _report_perm_h.tex \
  231. + _report_status_h.tex \
  232. + _report_symbolic_h.tex \
  233. + _report_triplet_h.tex \
  234. + _report_vector_h.tex \
  235. + _save_numeric_h.tex \
  236. + _save_symbolic_h.tex \
  237. + _scale_h.tex \
  238. + _solve_h.tex \
  239. + _symbolic_h.tex \
  240. + _tictoc_h.tex \
  241. + _timer_h.tex \
  242. + _transpose_h.tex \
  243. + _triplet_to_col_h.tex \
  244. + _wsolve_h.tex
  245. +
  246. +.INTERMEDIATE: UMFPACK_UserGuide.tex $(SRC)
  247. +UMFPACK_UserGuide.tex: $(SRC)
  248. +
  249. +.INTERMEDIATE: UMFPACK_UserGuide.bib
  250. +UMFPACK_UserGuide.bib: UserGuide.bib
  251. + $(LN_S) -f $< $@
  252. +
  253. +TEX = TEXINPUTS="$(srcdir):" pdflatex -interaction nonstopmode -file-line-error
  254. +BIB = BIBINPUTS="$(srcdir):" bibtex
  255. +%.pdf: %.tex %.bbl
  256. + $(TEX) $*
  257. + while grep -q "Rerun to get cross-references right" $*.log; do \
  258. + $(TEX) $*; \
  259. + done
  260. +%.bbl: %.aux %.bib
  261. + $(BIB) $*
  262. +%.aux: %.tex
  263. + $(TEX) $*
  264. +
  265. +# QuickStart does not include a bibliography, so the above rule won't work.
  266. +UMFPACK_QuickStart.pdf: %.pdf: %.tex
  267. + $(TEX) $*
  268. + while grep -q "Rerun to get cross-references right" $*.log; do \
  269. + $(TEX) $*; \
  270. + done
  271. +
  272. +CLEANFILES = *.aux *.bbl *.blg *.log *.toc UMFPACK_UserGuide.tex
  273. +MAINTAINERCLEANFILES = $(dist_pdf_DATA)
  274. diff --git a/Include/Makefile.am b/Include/Makefile.am
  275. new file mode 100644
  276. --- /dev/null
  277. +++ b/Include/Makefile.am
  278. @@ -0,0 +1,34 @@
  279. +pkginclude_HEADERS = \
  280. + umfpack.h \
  281. + umfpack_col_to_triplet.h \
  282. + umfpack_defaults.h \
  283. + umfpack_free_numeric.h \
  284. + umfpack_free_symbolic.h \
  285. + umfpack_get_determinant.h \
  286. + umfpack_get_lunz.h \
  287. + umfpack_get_numeric.h \
  288. + umfpack_get_symbolic.h \
  289. + umfpack_global.h \
  290. + umfpack_load_numeric.h \
  291. + umfpack_load_symbolic.h \
  292. + umfpack_numeric.h \
  293. + umfpack_qsymbolic.h \
  294. + umfpack_report_control.h \
  295. + umfpack_report_info.h \
  296. + umfpack_report_matrix.h \
  297. + umfpack_report_numeric.h \
  298. + umfpack_report_perm.h \
  299. + umfpack_report_status.h \
  300. + umfpack_report_symbolic.h \
  301. + umfpack_report_triplet.h \
  302. + umfpack_report_vector.h \
  303. + umfpack_save_numeric.h \
  304. + umfpack_save_symbolic.h \
  305. + umfpack_scale.h \
  306. + umfpack_solve.h \
  307. + umfpack_symbolic.h \
  308. + umfpack_tictoc.h \
  309. + umfpack_timer.h \
  310. + umfpack_transpose.h \
  311. + umfpack_triplet_to_col.h \
  312. + umfpack_wsolve.h
  313. diff --git a/Makefile.am b/Makefile.am
  314. new file mode 100644
  315. --- /dev/null
  316. +++ b/Makefile.am
  317. @@ -0,0 +1,9 @@
  318. +ACLOCAL_AMFLAGS = -I m4
  319. +
  320. +SUBDIRS = Include Source Demo Tcov Doc
  321. +EXTRA_DIST = README.txt
  322. +
  323. +pkgconfig_DATA = umfpack.pc
  324. +
  325. +CODE_COVERAGE_BRANCH_COVERAGE = 1
  326. +@CODE_COVERAGE_RULES@
  327. diff --git a/Source/Makefile.am b/Source/Makefile.am
  328. new file mode 100644
  329. --- /dev/null
  330. +++ b/Source/Makefile.am
  331. @@ -0,0 +1,323 @@
  332. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(CHOLMOD_CFLAGS) $(AMD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  333. +AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
  334. +
  335. +if CODE_COVERAGE_ENABLED
  336. +AM_CPPFLAGS += -DTESTING
  337. +endif
  338. +
  339. +# non-user-callable umf_*.[ch] files:
  340. +UMF = \
  341. + umf_assemble.c \
  342. + umf_blas3_update.c \
  343. + umf_build_tuples.c \
  344. + umf_create_element.c \
  345. + umf_dump.c \
  346. + umf_extend_front.c \
  347. + umf_garbage_collection.c \
  348. + umf_get_memory.c \
  349. + umf_grow_front.c \
  350. + umf_init_front.c \
  351. + umf_kernel.c \
  352. + umf_kernel_init.c \
  353. + umf_kernel_wrapup.c \
  354. + umf_local_search.c \
  355. + umf_lsolve.c \
  356. + umf_ltsolve.c \
  357. + umf_mem_alloc_element.c \
  358. + umf_mem_alloc_head_block.c \
  359. + umf_mem_alloc_tail_block.c \
  360. + umf_mem_free_tail_block.c \
  361. + umf_mem_init_memoryspace.c \
  362. + umf_report_vector.c \
  363. + umf_row_search.c \
  364. + umf_scale.c \
  365. + umf_scale_column.c \
  366. + umf_set_stats.c \
  367. + umf_solve.c \
  368. + umf_start_front.c \
  369. + umf_store_lu.c \
  370. + umf_symbolic_usage.c \
  371. + umf_transpose.c \
  372. + umf_triplet.c \
  373. + umf_tuple_lengths.c \
  374. + umf_usolve.c \
  375. + umf_utsolve.c \
  376. + umf_valid_numeric.c \
  377. + umf_valid_symbolic.c
  378. +
  379. +# non-user-callable umf_*.[ch] files
  380. +# int/SuiteSparse_long versions only (no real/complex):
  381. +UMFINT = \
  382. + umf_analyze.c \
  383. + umf_apply_order.c \
  384. + umf_cholmod.c \
  385. + umf_colamd.c \
  386. + umf_free.c \
  387. + umf_fsize.c \
  388. + umf_is_permutation.c \
  389. + umf_malloc.c \
  390. + umf_realloc.c \
  391. + umf_report_perm.c \
  392. + umf_singletons.c
  393. +
  394. +# user-callable umfpack_*.c files
  395. +# (int/SuiteSparse_long and real/complex):
  396. +UMFPACK = \
  397. + umfpack_col_to_triplet.c \
  398. + umfpack_defaults.c \
  399. + umfpack_free_numeric.c \
  400. + umfpack_free_symbolic.c \
  401. + umfpack_get_determinant.c \
  402. + umfpack_get_lunz.c \
  403. + umfpack_get_numeric.c \
  404. + umfpack_get_symbolic.c \
  405. + umfpack_load_numeric.c \
  406. + umfpack_load_symbolic.c \
  407. + umfpack_numeric.c \
  408. + umfpack_qsymbolic.c \
  409. + umfpack_report_control.c \
  410. + umfpack_report_info.c \
  411. + umfpack_report_matrix.c \
  412. + umfpack_report_numeric.c \
  413. + umfpack_report_perm.c \
  414. + umfpack_report_status.c \
  415. + umfpack_report_symbolic.c \
  416. + umfpack_report_triplet.c \
  417. + umfpack_report_vector.c \
  418. + umfpack_save_numeric.c \
  419. + umfpack_save_symbolic.c \
  420. + umfpack_scale.c \
  421. + umfpack_solve.c \
  422. + umfpack_symbolic.c \
  423. + umfpack_transpose.c \
  424. + umfpack_triplet_to_col.c
  425. +
  426. +# user-callable umfpack_*.c files
  427. +# only one version for int/SuiteSparse_long, real/complex:
  428. +GENERIC = \
  429. + umfpack_timer.c \
  430. + umfpack_tictoc.c \
  431. + umfpack_global.c
  432. +
  433. +noinst_HEADERS = \
  434. + cholmod_blas.h \
  435. + umf_config.h \
  436. + umf_internal.h \
  437. + umf_version.h \
  438. + $(UMF:.c=.h) \
  439. + $(UMFINT:.c=.h)
  440. +
  441. +noinst_LTLIBRARIES = \
  442. + libumf_i.la \
  443. + libumf_l.la \
  444. + libumf_di_hsolve.la \
  445. + libumf_di_triplet_map_x.la \
  446. + libumf_di_triplet_map_nox.la \
  447. + libumf_di_triplet_nomap_x.la \
  448. + libumf_di_assemble_fixq.la \
  449. + libumf_di_store_lu_drop.la \
  450. + libumf_di.la \
  451. + libumfpack_di_wsolve.la \
  452. + libumfpack_di.la \
  453. + libumf_dl_hsolve.la \
  454. + libumf_dl_triplet_map_x.la \
  455. + libumf_dl_triplet_map_nox.la \
  456. + libumf_dl_triplet_nomap_x.la \
  457. + libumf_dl_assemble_fixq.la \
  458. + libumf_dl_store_lu_drop.la \
  459. + libumf_dl.la \
  460. + libumfpack_dl_wsolve.la \
  461. + libumfpack_dl.la \
  462. + libumf_zi_hsolve.la \
  463. + libumf_zi_triplet_map_x.la \
  464. + libumf_zi_triplet_map_nox.la \
  465. + libumf_zi_triplet_nomap_x.la \
  466. + libumf_zi_assemble_fixq.la \
  467. + libumf_zi_store_lu_drop.la \
  468. + libumf_zi.la \
  469. + libumfpack_zi_wsolve.la \
  470. + libumfpack_zi.la \
  471. + libumf_zl_hsolve.la \
  472. + libumf_zl_triplet_map_x.la \
  473. + libumf_zl_triplet_map_nox.la \
  474. + libumf_zl_triplet_nomap_x.la \
  475. + libumf_zl_assemble_fixq.la \
  476. + libumf_zl_store_lu_drop.la \
  477. + libumf_zl.la \
  478. + libumfpack_zl_wsolve.la \
  479. + libumfpack_zl.la
  480. +
  481. +# compile each int and SuiteSparse_long routine (with no real/complex version)
  482. +libumf_i_la_SOURCES = $(UMFINT)
  483. +libumf_i_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT
  484. +
  485. +libumf_l_la_SOURCES = $(UMFINT)
  486. +libumf_l_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  487. +
  488. +if CHOLMOD
  489. +libumf_i_la_LIBADD = $(CHOLMOD_LIBS)
  490. +libumf_l_la_LIBADD = $(CHOLMOD_LIBS)
  491. +else
  492. +libumf_i_la_CPPFLAGS += -DNCHOLMOD
  493. +libumf_l_la_CPPFLAGS += -DNCHOLMOD
  494. +endif
  495. +
  496. +# compile each routine in the DI version
  497. +libumf_di_hsolve_la_SOURCES = umf_ltsolve.c umf_utsolve.c
  498. +libumf_di_hsolve_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT -DCONJUGATE_SOLVE
  499. +
  500. +libumf_di_triplet_map_x_la_SOURCES = umf_triplet.c
  501. +libumf_di_triplet_map_x_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT -DDO_MAP -DDO_VALUES
  502. +
  503. +libumf_di_triplet_map_nox_la_SOURCES = umf_triplet.c
  504. +libumf_di_triplet_map_nox_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT -DDO_MAP
  505. +
  506. +libumf_di_triplet_nomap_x_la_SOURCES = umf_triplet.c
  507. +libumf_di_triplet_nomap_x_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT -DDO_VALUES
  508. +
  509. +libumf_di_assemble_fixq_la_SOURCES = umf_assemble.c
  510. +libumf_di_assemble_fixq_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT -DFIXQ
  511. +
  512. +libumf_di_store_lu_drop_la_SOURCES = umf_store_lu.c
  513. +libumf_di_store_lu_drop_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT -DDROP
  514. +
  515. +libumf_di_la_SOURCES = $(UMF)
  516. +libumf_di_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT
  517. +libumf_di_la_LIBADD = \
  518. + libumf_di_hsolve.la \
  519. + libumf_di_triplet_map_x.la \
  520. + libumf_di_triplet_map_nox.la \
  521. + libumf_di_triplet_nomap_x.la \
  522. + libumf_di_assemble_fixq.la \
  523. + libumf_di_store_lu_drop.la
  524. +
  525. +libumfpack_di_wsolve_la_SOURCES = umfpack_solve.c
  526. +libumfpack_di_wsolve_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT -DWSOLVE
  527. +
  528. +libumfpack_di_la_SOURCES = $(UMFPACK)
  529. +libumfpack_di_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT
  530. +libumfpack_di_la_LIBADD = \
  531. + libumfpack_di_wsolve.la
  532. +
  533. +# compile each routine in the DL version
  534. +libumf_dl_hsolve_la_SOURCES = umf_ltsolve.c umf_utsolve.c
  535. +libumf_dl_hsolve_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DCONJUGATE_SOLVE
  536. +
  537. +libumf_dl_triplet_map_x_la_SOURCES = umf_triplet.c
  538. +libumf_dl_triplet_map_x_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DDO_MAP -DDO_VALUES
  539. +
  540. +libumf_dl_triplet_map_nox_la_SOURCES = umf_triplet.c
  541. +libumf_dl_triplet_map_nox_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DDO_MAP
  542. +
  543. +libumf_dl_triplet_nomap_x_la_SOURCES = umf_triplet.c
  544. +libumf_dl_triplet_nomap_x_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DDO_VALUES
  545. +
  546. +libumf_dl_assemble_fixq_la_SOURCES = umf_assemble.c
  547. +libumf_dl_assemble_fixq_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DFIXQ
  548. +
  549. +libumf_dl_store_lu_drop_la_SOURCES = umf_store_lu.c
  550. +libumf_dl_store_lu_drop_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DDROP
  551. +
  552. +libumf_dl_la_SOURCES = $(UMF)
  553. +libumf_dl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  554. +libumf_dl_la_LIBADD = \
  555. + libumf_dl_hsolve.la \
  556. + libumf_dl_triplet_map_x.la \
  557. + libumf_dl_triplet_map_nox.la \
  558. + libumf_dl_triplet_nomap_x.la \
  559. + libumf_dl_assemble_fixq.la \
  560. + libumf_dl_store_lu_drop.la
  561. +
  562. +libumfpack_dl_wsolve_la_SOURCES = umfpack_solve.c
  563. +libumfpack_dl_wsolve_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DWSOLVE
  564. +
  565. +libumfpack_dl_la_SOURCES = $(UMFPACK)
  566. +libumfpack_dl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  567. +libumfpack_dl_la_LIBADD = \
  568. + libumfpack_dl_wsolve.la
  569. +
  570. +# compile each routine in the ZI version
  571. +libumf_zi_hsolve_la_SOURCES = umf_ltsolve.c umf_utsolve.c
  572. +libumf_zi_hsolve_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT -DCONJUGATE_SOLVE
  573. +
  574. +libumf_zi_triplet_map_x_la_SOURCES = umf_triplet.c
  575. +libumf_zi_triplet_map_x_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT -DDO_MAP -DDO_VALUES
  576. +
  577. +libumf_zi_triplet_map_nox_la_SOURCES = umf_triplet.c
  578. +libumf_zi_triplet_map_nox_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT -DDO_MAP
  579. +
  580. +libumf_zi_triplet_nomap_x_la_SOURCES = umf_triplet.c
  581. +libumf_zi_triplet_nomap_x_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT -DDO_VALUES
  582. +
  583. +libumf_zi_assemble_fixq_la_SOURCES = umf_assemble.c
  584. +libumf_zi_assemble_fixq_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT -DFIXQ
  585. +
  586. +libumf_zi_store_lu_drop_la_SOURCES = umf_store_lu.c
  587. +libumf_zi_store_lu_drop_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT -DDROP
  588. +
  589. +libumf_zi_la_SOURCES = $(UMF)
  590. +libumf_zi_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT
  591. +libumf_zi_la_LIBADD = \
  592. + libumf_zi_hsolve.la \
  593. + libumf_zi_triplet_map_x.la \
  594. + libumf_zi_triplet_map_nox.la \
  595. + libumf_zi_triplet_nomap_x.la \
  596. + libumf_zi_assemble_fixq.la \
  597. + libumf_zi_store_lu_drop.la
  598. +
  599. +libumfpack_zi_wsolve_la_SOURCES = umfpack_solve.c
  600. +libumfpack_zi_wsolve_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT -DWSOLVE
  601. +
  602. +libumfpack_zi_la_SOURCES = $(UMFPACK)
  603. +libumfpack_zi_la_CPPFLAGS = $(AM_CPPFLAGS) -DZINT
  604. +libumfpack_zi_la_LIBADD = \
  605. + libumfpack_zi_wsolve.la
  606. +
  607. +# compile each routine in the ZL version
  608. +libumf_zl_hsolve_la_SOURCES = umf_ltsolve.c umf_utsolve.c
  609. +libumf_zl_hsolve_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG -DCONJUGATE_SOLVE
  610. +
  611. +libumf_zl_triplet_map_x_la_SOURCES = umf_triplet.c
  612. +libumf_zl_triplet_map_x_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG -DDO_MAP -DDO_VALUES
  613. +
  614. +libumf_zl_triplet_map_nox_la_SOURCES = umf_triplet.c
  615. +libumf_zl_triplet_map_nox_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG -DDO_MAP
  616. +
  617. +libumf_zl_triplet_nomap_x_la_SOURCES = umf_triplet.c
  618. +libumf_zl_triplet_nomap_x_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG -DDO_VALUES
  619. +
  620. +libumf_zl_assemble_fixq_la_SOURCES = umf_assemble.c
  621. +libumf_zl_assemble_fixq_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG -DFIXQ
  622. +
  623. +libumf_zl_store_lu_drop_la_SOURCES = umf_store_lu.c
  624. +libumf_zl_store_lu_drop_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG -DDROP
  625. +
  626. +libumf_zl_la_SOURCES = $(UMF)
  627. +libumf_zl_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG
  628. +libumf_zl_la_LIBADD = \
  629. + libumf_zl_hsolve.la \
  630. + libumf_zl_triplet_map_x.la \
  631. + libumf_zl_triplet_map_nox.la \
  632. + libumf_zl_triplet_nomap_x.la \
  633. + libumf_zl_assemble_fixq.la \
  634. + libumf_zl_store_lu_drop.la
  635. +
  636. +libumfpack_zl_wsolve_la_SOURCES = umfpack_solve.c
  637. +libumfpack_zl_wsolve_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG -DWSOLVE
  638. +
  639. +libumfpack_zl_la_SOURCES = $(UMFPACK)
  640. +libumfpack_zl_la_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG
  641. +libumfpack_zl_la_LIBADD = \
  642. + libumfpack_zl_wsolve.la
  643. +
  644. +lib_LTLIBRARIES = libumfpack.la
  645. +libumfpack_la_SOURCES = $(GENERIC)
  646. +libumfpack_la_LIBADD = \
  647. + libumf_i.la \
  648. + libumf_l.la \
  649. + libumf_di.la libumfpack_di.la \
  650. + libumf_dl.la libumfpack_dl.la \
  651. + libumf_zi.la libumfpack_zi.la \
  652. + libumf_zl.la libumfpack_zl.la \
  653. + $(AMD_LIBS) $(SUITESPARSECONFIG_LIBS) $(BLAS_LIBS) -lm $(CODE_COVERAGE_LIBS)
  654. +libumfpack_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION)
  655. diff --git a/Tcov/Makefile.am b/Tcov/Makefile.am
  656. new file mode 100644
  657. --- /dev/null
  658. +++ b/Tcov/Makefile.am
  659. @@ -0,0 +1,83 @@
  660. +AM_CPPFLAGS = -I$(top_srcdir)/Include -I$(top_srcdir)/Source $(AMD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS)
  661. +
  662. +EXTRA_DIST = \
  663. + README.txt
  664. +
  665. +dist_noinst_DATA = \
  666. + badnum.umf \
  667. + badnum2.umf \
  668. + badsym.umf \
  669. + badsym2.umf \
  670. + TestMat/S_d2q06c \
  671. + TestMat/adlittle \
  672. + TestMat/arc130 \
  673. + TestMat/cage3 \
  674. + TestMat/d_dyn \
  675. + TestMat/galenet \
  676. + TestMat/matrix1 \
  677. + TestMat/matrix2 \
  678. + TestMat/matrix3 \
  679. + TestMat/matrix4 \
  680. + TestMat/matrix5 \
  681. + TestMat/matrix6 \
  682. + TestMat/matrix7 \
  683. + TestMat/matrix8 \
  684. + TestMat/matrix10 \
  685. + TestMat/matrix11 \
  686. + TestMat/matrix12 \
  687. + TestMat/matrix13 \
  688. + TestMat/matrix14 \
  689. + TestMat/matrix15 \
  690. + TestMat/matrix16 \
  691. + TestMat/matrix17 \
  692. + TestMat/matrix18 \
  693. + TestMat/matrix19 \
  694. + TestMat/matrix20 \
  695. + TestMat/matrix21 \
  696. + TestMat/matrix22 \
  697. + TestMat/matrix23 \
  698. + TestMat/matrix24 \
  699. + TestMat/matrix25 \
  700. + TestMat/matrix26 \
  701. + TestMat/matrix27 \
  702. + TestMat/matrix28 \
  703. + TestMat/matrix29 \
  704. + TestMat/matrix30 \
  705. + TestMat/nug07 \
  706. + TestMat/shl0
  707. +
  708. +if CODE_COVERAGE_ENABLED
  709. +# TODO: Support the various flag combinations in the Make.# files.
  710. +# Probably requires copying them to Source/Makefile.am and rebuilding all.
  711. +AM_CPPFLAGS += -DTESTING
  712. +
  713. +check_PROGRAMS = \
  714. + ut_di \
  715. + ut_dl \
  716. + ut_zi \
  717. + ut_zl
  718. +
  719. +ut_di_SOURCES = ut.c
  720. +ut_di_LDADD = $(top_builddir)/Source/libumfpack.la $(AMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm
  721. +ut_di_CPPFLAGS = $(AM_CPPFLAGS) -DDINT
  722. +
  723. +ut_dl_SOURCES = ut.c
  724. +ut_dl_LDADD = $(top_builddir)/Source/libumfpack.la $(AMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm
  725. +ut_dl_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  726. +
  727. +ut_zi_SOURCES = ut.c
  728. +ut_zi_LDADD = $(top_builddir)/Source/libumfpack.la $(AMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm
  729. +ut_zi_CPPFLAGS = $(AM_CPPFLAGS) -DZINT
  730. +
  731. +ut_zl_SOURCES = ut.c
  732. +ut_zl_LDADD = $(top_builddir)/Source/libumfpack.la $(AMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm
  733. +ut_zl_CPPFLAGS = $(AM_CPPFLAGS) -DZLONG
  734. +
  735. +check-local: $(check_PROGRAMS)
  736. + ./ut_di > ut_di.out
  737. + ./ut_dl > ut_dl.out
  738. + ./ut_zi > ut_zi.out
  739. + ./ut_zl > ut_zl.out
  740. +endif
  741. +
  742. +CLEANFILES = A500 n.umf numeric.umf s.umf symbolic.umf debug.amd debug.umf *.out
  743. diff --git a/configure.ac b/configure.ac
  744. new file mode 100644
  745. --- /dev/null
  746. +++ b/configure.ac
  747. @@ -0,0 +1,117 @@
  748. +# -*- Autoconf -*-
  749. +# Process this file with autoconf to produce a configure script.
  750. +
  751. +AC_PREREQ([2.69])
  752. +AC_INIT([UMFPACK],[5.7.9],[https://github.com/DrTimothyAldenDavis/SuiteSparse],[umfpack],[http://www.suitesparse.com/])
  753. +AC_CONFIG_SRCDIR([Source/umfpack_solve.c])
  754. +AC_CONFIG_AUX_DIR([build-aux])
  755. +AC_CONFIG_MACRO_DIR([m4])
  756. +AC_CONFIG_HEADERS([config.h])
  757. +AM_INIT_AUTOMAKE([foreign])
  758. +AM_SILENT_RULES([yes])
  759. +LT_INIT([disable-static])
  760. +
  761. +# Checks for programs.
  762. +PKG_PROG_PKG_CONFIG
  763. +AC_PROG_INSTALL
  764. +AC_PROG_CC
  765. +AC_PROG_F77
  766. +AX_CODE_COVERAGE
  767. +
  768. +AC_ARG_WITH([cholmod],
  769. + [AS_HELP_STRING(
  770. + [--without-cholmod],
  771. + [do not use CHOLMOD for ordering methods])],
  772. + [],
  773. + [AS_VAR_SET([with_cholmod], [yes])])
  774. +
  775. +AS_VAR_SET([LIBS_SAVED], [$LIBS])
  776. +
  777. +# Checks for libraries.
  778. +AC_CHECK_LIB([m], [sqrt])
  779. +
  780. +AX_BLAS(
  781. + [],
  782. + [AC_MSG_ERROR([cannot find BLAS])])
  783. +
  784. +PKG_CHECK_MODULES([SUITESPARSECONFIG], [suitesparseconfig])
  785. +PKG_CHECK_MODULES([AMD], [amd])
  786. +AS_VAR_SET([UMFPACK_REQUIRES], ["suitesparseconfig amd"])
  787. +
  788. +AS_IF([test "x$with_cholmod" = "xyes"], [
  789. + PKG_CHECK_MODULES([CHOLMOD], [cholmod])
  790. + AS_VAR_APPEND([UMFPACK_REQUIRES], [" cholmod"])
  791. +])
  792. +
  793. +# Checks for header files.
  794. +AC_CHECK_HEADERS([float.h stdlib.h string.h])
  795. +
  796. +# Checks for typedefs, structures, and compiler characteristics.
  797. +AC_TYPE_SIZE_T
  798. +
  799. +# Checks for library functions.
  800. +AC_FUNC_ERROR_AT_LINE
  801. +AC_FUNC_MALLOC
  802. +AC_CHECK_FUNCS([pow sqrt])
  803. +
  804. +AS_VAR_SET([LIBS], [$LIBS_SAVED])
  805. +
  806. +AC_MSG_CHECKING([whether to use CHOLMOD for ordering methods])
  807. +AC_MSG_RESULT([$with_cholmod])
  808. +AM_CONDITIONAL([CHOLMOD], [test "x$with_cholmod" = "xyes"])
  809. +
  810. +AC_SUBST([UMFPACK_REQUIRES])
  811. +
  812. +m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_SUBST([pkgconfigdir], [${libdir}/pkgconfig])])
  813. +AC_CONFIG_FILES([
  814. + umfpack.pc
  815. + Makefile
  816. + Demo/Makefile
  817. + Doc/Makefile
  818. + Include/Makefile
  819. + Source/Makefile
  820. + Tcov/Makefile
  821. +])
  822. +AC_CONFIG_LINKS([Tcov/badnum.umf:Tcov/badnum.umf])
  823. +AC_CONFIG_LINKS([Tcov/badnum2.umf:Tcov/badnum2.umf])
  824. +AC_CONFIG_LINKS([Tcov/badsym.umf:Tcov/badsym.umf])
  825. +AC_CONFIG_LINKS([Tcov/badsym2.umf:Tcov/badsym2.umf])
  826. +#AC_CONFIG_LINKS([Tcov/TestMat:Tcov/TestMat]) # Can't link an entire directory?
  827. +AC_CONFIG_LINKS([Tcov/TestMat/S_d2q06c:Tcov/TestMat/S_d2q06c])
  828. +AC_CONFIG_LINKS([Tcov/TestMat/adlittle:Tcov/TestMat/adlittle])
  829. +AC_CONFIG_LINKS([Tcov/TestMat/arc130:Tcov/TestMat/arc130])
  830. +AC_CONFIG_LINKS([Tcov/TestMat/cage3:Tcov/TestMat/cage3])
  831. +AC_CONFIG_LINKS([Tcov/TestMat/d_dyn:Tcov/TestMat/d_dyn])
  832. +AC_CONFIG_LINKS([Tcov/TestMat/galenet:Tcov/TestMat/galenet])
  833. +AC_CONFIG_LINKS([Tcov/TestMat/matrix1:Tcov/TestMat/matrix1])
  834. +AC_CONFIG_LINKS([Tcov/TestMat/matrix2:Tcov/TestMat/matrix2])
  835. +AC_CONFIG_LINKS([Tcov/TestMat/matrix3:Tcov/TestMat/matrix3])
  836. +AC_CONFIG_LINKS([Tcov/TestMat/matrix4:Tcov/TestMat/matrix4])
  837. +AC_CONFIG_LINKS([Tcov/TestMat/matrix5:Tcov/TestMat/matrix5])
  838. +AC_CONFIG_LINKS([Tcov/TestMat/matrix6:Tcov/TestMat/matrix6])
  839. +AC_CONFIG_LINKS([Tcov/TestMat/matrix7:Tcov/TestMat/matrix7])
  840. +AC_CONFIG_LINKS([Tcov/TestMat/matrix8:Tcov/TestMat/matrix8])
  841. +AC_CONFIG_LINKS([Tcov/TestMat/matrix10:Tcov/TestMat/matrix10])
  842. +AC_CONFIG_LINKS([Tcov/TestMat/matrix11:Tcov/TestMat/matrix11])
  843. +AC_CONFIG_LINKS([Tcov/TestMat/matrix12:Tcov/TestMat/matrix12])
  844. +AC_CONFIG_LINKS([Tcov/TestMat/matrix13:Tcov/TestMat/matrix13])
  845. +AC_CONFIG_LINKS([Tcov/TestMat/matrix14:Tcov/TestMat/matrix14])
  846. +AC_CONFIG_LINKS([Tcov/TestMat/matrix15:Tcov/TestMat/matrix15])
  847. +AC_CONFIG_LINKS([Tcov/TestMat/matrix16:Tcov/TestMat/matrix16])
  848. +AC_CONFIG_LINKS([Tcov/TestMat/matrix17:Tcov/TestMat/matrix17])
  849. +AC_CONFIG_LINKS([Tcov/TestMat/matrix18:Tcov/TestMat/matrix18])
  850. +AC_CONFIG_LINKS([Tcov/TestMat/matrix19:Tcov/TestMat/matrix19])
  851. +AC_CONFIG_LINKS([Tcov/TestMat/matrix20:Tcov/TestMat/matrix20])
  852. +AC_CONFIG_LINKS([Tcov/TestMat/matrix21:Tcov/TestMat/matrix21])
  853. +AC_CONFIG_LINKS([Tcov/TestMat/matrix22:Tcov/TestMat/matrix22])
  854. +AC_CONFIG_LINKS([Tcov/TestMat/matrix23:Tcov/TestMat/matrix23])
  855. +AC_CONFIG_LINKS([Tcov/TestMat/matrix24:Tcov/TestMat/matrix24])
  856. +AC_CONFIG_LINKS([Tcov/TestMat/matrix25:Tcov/TestMat/matrix25])
  857. +AC_CONFIG_LINKS([Tcov/TestMat/matrix26:Tcov/TestMat/matrix26])
  858. +AC_CONFIG_LINKS([Tcov/TestMat/matrix27:Tcov/TestMat/matrix27])
  859. +AC_CONFIG_LINKS([Tcov/TestMat/matrix28:Tcov/TestMat/matrix28])
  860. +AC_CONFIG_LINKS([Tcov/TestMat/matrix29:Tcov/TestMat/matrix29])
  861. +AC_CONFIG_LINKS([Tcov/TestMat/matrix30:Tcov/TestMat/matrix30])
  862. +AC_CONFIG_LINKS([Tcov/TestMat/nug07:Tcov/TestMat/nug07])
  863. +AC_CONFIG_LINKS([Tcov/TestMat/shl0:Tcov/TestMat/shl0])
  864. +AC_OUTPUT
  865. diff --git a/m4/ax_blas.m4 b/m4/ax_blas.m4
  866. new file mode 100644
  867. --- /dev/null
  868. +++ b/m4/ax_blas.m4
  869. @@ -0,0 +1,241 @@
  870. +# ===========================================================================
  871. +# https://www.gnu.org/software/autoconf-archive/ax_blas.html
  872. +# ===========================================================================
  873. +#
  874. +# SYNOPSIS
  875. +#
  876. +# AX_BLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
  877. +#
  878. +# DESCRIPTION
  879. +#
  880. +# This macro looks for a library that implements the BLAS linear-algebra
  881. +# interface (see http://www.netlib.org/blas/). On success, it sets the
  882. +# BLAS_LIBS output variable to hold the requisite library linkages.
  883. +#
  884. +# To link with BLAS, you should link with:
  885. +#
  886. +# $BLAS_LIBS $LIBS $FLIBS
  887. +#
  888. +# in that order. FLIBS is the output variable of the
  889. +# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by AX_BLAS), and is
  890. +# sometimes necessary in order to link with F77 libraries. Users will also
  891. +# need to use AC_F77_DUMMY_MAIN (see the autoconf manual), for the same
  892. +# reason.
  893. +#
  894. +# Many libraries are searched for, from ATLAS to CXML to ESSL. The user
  895. +# may also use --with-blas=<lib> in order to use some specific BLAS
  896. +# library <lib>. In order to link successfully, however, be aware that you
  897. +# will probably need to use the same Fortran compiler (which can be set
  898. +# via the F77 env. var.) as was used to compile the BLAS library.
  899. +#
  900. +# ACTION-IF-FOUND is a list of shell commands to run if a BLAS library is
  901. +# found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is
  902. +# not found. If ACTION-IF-FOUND is not specified, the default action will
  903. +# define HAVE_BLAS.
  904. +#
  905. +# LICENSE
  906. +#
  907. +# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
  908. +# Copyright (c) 2019 Geoffrey M. Oxberry <goxberry@gmail.com>
  909. +#
  910. +# This program is free software: you can redistribute it and/or modify it
  911. +# under the terms of the GNU General Public License as published by the
  912. +# Free Software Foundation, either version 3 of the License, or (at your
  913. +# option) any later version.
  914. +#
  915. +# This program is distributed in the hope that it will be useful, but
  916. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  917. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  918. +# Public License for more details.
  919. +#
  920. +# You should have received a copy of the GNU General Public License along
  921. +# with this program. If not, see <https://www.gnu.org/licenses/>.
  922. +#
  923. +# As a special exception, the respective Autoconf Macro's copyright owner
  924. +# gives unlimited permission to copy, distribute and modify the configure
  925. +# scripts that are the output of Autoconf when processing the Macro. You
  926. +# need not follow the terms of the GNU General Public License when using
  927. +# or distributing such scripts, even though portions of the text of the
  928. +# Macro appear in them. The GNU General Public License (GPL) does govern
  929. +# all other use of the material that constitutes the Autoconf Macro.
  930. +#
  931. +# This special exception to the GPL applies to versions of the Autoconf
  932. +# Macro released by the Autoconf Archive. When you make and distribute a
  933. +# modified version of the Autoconf Macro, you may extend this special
  934. +# exception to the GPL to apply to your modified version as well.
  935. +
  936. +#serial 17
  937. +
  938. +AU_ALIAS([ACX_BLAS], [AX_BLAS])
  939. +AC_DEFUN([AX_BLAS], [
  940. +AC_PREREQ([2.55])
  941. +AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
  942. +AC_REQUIRE([AC_CANONICAL_HOST])
  943. +ax_blas_ok=no
  944. +
  945. +AC_ARG_WITH(blas,
  946. + [AS_HELP_STRING([--with-blas=<lib>], [use BLAS library <lib>])])
  947. +case $with_blas in
  948. + yes | "") ;;
  949. + no) ax_blas_ok=disable ;;
  950. + -* | */* | *.a | *.so | *.so.* | *.dylib | *.dylib.* | *.o)
  951. + BLAS_LIBS="$with_blas"
  952. + ;;
  953. + *) BLAS_LIBS="-l$with_blas" ;;
  954. +esac
  955. +
  956. +# Get fortran linker names of BLAS functions to check for.
  957. +AC_F77_FUNC(sgemm)
  958. +AC_F77_FUNC(dgemm)
  959. +
  960. +ax_blas_save_LIBS="$LIBS"
  961. +LIBS="$LIBS $FLIBS"
  962. +
  963. +# First, check BLAS_LIBS environment variable
  964. +if test $ax_blas_ok = no; then
  965. +if test "x$BLAS_LIBS" != x; then
  966. + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
  967. + AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS])
  968. + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes], [BLAS_LIBS=""])
  969. + AC_MSG_RESULT($ax_blas_ok)
  970. + LIBS="$save_LIBS"
  971. +fi
  972. +fi
  973. +
  974. +# BLAS linked to by default? (happens on some supercomputers)
  975. +if test $ax_blas_ok = no; then
  976. + save_LIBS="$LIBS"; LIBS="$LIBS"
  977. + AC_MSG_CHECKING([if $sgemm is being linked in already])
  978. + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes])
  979. + AC_MSG_RESULT($ax_blas_ok)
  980. + LIBS="$save_LIBS"
  981. +fi
  982. +
  983. +# BLAS in OpenBLAS library? (http://xianyi.github.com/OpenBLAS/)
  984. +if test $ax_blas_ok = no; then
  985. + AC_CHECK_LIB(openblas, $sgemm, [ax_blas_ok=yes
  986. + BLAS_LIBS="-lopenblas"])
  987. +fi
  988. +
  989. +# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
  990. +if test $ax_blas_ok = no; then
  991. + AC_CHECK_LIB(atlas, ATL_xerbla,
  992. + [AC_CHECK_LIB(f77blas, $sgemm,
  993. + [AC_CHECK_LIB(cblas, cblas_dgemm,
  994. + [ax_blas_ok=yes
  995. + BLAS_LIBS="-lcblas -lf77blas -latlas"],
  996. + [], [-lf77blas -latlas])],
  997. + [], [-latlas])])
  998. +fi
  999. +
  1000. +# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
  1001. +if test $ax_blas_ok = no; then
  1002. + AC_CHECK_LIB(blas, $sgemm,
  1003. + [AC_CHECK_LIB(dgemm, $dgemm,
  1004. + [AC_CHECK_LIB(sgemm, $sgemm,
  1005. + [ax_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"],
  1006. + [], [-lblas])],
  1007. + [], [-lblas])])
  1008. +fi
  1009. +
  1010. +# BLAS in Intel MKL library?
  1011. +if test $ax_blas_ok = no; then
  1012. + # MKL for gfortran
  1013. + if test x"$ac_cv_fc_compiler_gnu" = xyes; then
  1014. + # 64 bit
  1015. + if test $host_cpu = x86_64; then
  1016. + AC_CHECK_LIB(mkl_gf_lp64, $sgemm,
  1017. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread"],,
  1018. + [-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread])
  1019. + # 32 bit
  1020. + elif test $host_cpu = i686; then
  1021. + AC_CHECK_LIB(mkl_gf, $sgemm,
  1022. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf -lmkl_sequential -lmkl_core -lpthread"],,
  1023. + [-lmkl_gf -lmkl_sequential -lmkl_core -lpthread])
  1024. + fi
  1025. + # MKL for other compilers (Intel, PGI, ...?)
  1026. + else
  1027. + # 64-bit
  1028. + if test $host_cpu = x86_64; then
  1029. + AC_CHECK_LIB(mkl_intel_lp64, $sgemm,
  1030. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread"],,
  1031. + [-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread])
  1032. + # 32-bit
  1033. + elif test $host_cpu = i686; then
  1034. + AC_CHECK_LIB(mkl_intel, $sgemm,
  1035. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel -lmkl_sequential -lmkl_core -lpthread"],,
  1036. + [-lmkl_intel -lmkl_sequential -lmkl_core -lpthread])
  1037. + fi
  1038. + fi
  1039. +fi
  1040. +# Old versions of MKL
  1041. +if test $ax_blas_ok = no; then
  1042. + AC_CHECK_LIB(mkl, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lmkl -lguide -lpthread"],,[-lguide -lpthread])
  1043. +fi
  1044. +
  1045. +# BLAS in Apple vecLib library?
  1046. +if test $ax_blas_ok = no; then
  1047. + save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS"
  1048. + AC_MSG_CHECKING([for $sgemm in -framework vecLib])
  1049. + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes;BLAS_LIBS="-framework vecLib"])
  1050. + AC_MSG_RESULT($ax_blas_ok)
  1051. + LIBS="$save_LIBS"
  1052. +fi
  1053. +
  1054. +# BLAS in Alpha CXML library?
  1055. +if test $ax_blas_ok = no; then
  1056. + AC_CHECK_LIB(cxml, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lcxml"])
  1057. +fi
  1058. +
  1059. +# BLAS in Alpha DXML library? (now called CXML, see above)
  1060. +if test $ax_blas_ok = no; then
  1061. + AC_CHECK_LIB(dxml, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-ldxml"])
  1062. +fi
  1063. +
  1064. +# BLAS in Sun Performance library?
  1065. +if test $ax_blas_ok = no; then
  1066. + if test "x$GCC" != xyes; then # only works with Sun CC
  1067. + AC_CHECK_LIB(sunmath, acosp,
  1068. + [AC_CHECK_LIB(sunperf, $sgemm,
  1069. + [BLAS_LIBS="-xlic_lib=sunperf -lsunmath"
  1070. + ax_blas_ok=yes],[],[-lsunmath])])
  1071. + fi
  1072. +fi
  1073. +
  1074. +# BLAS in SCSL library? (SGI/Cray Scientific Library)
  1075. +if test $ax_blas_ok = no; then
  1076. + AC_CHECK_LIB(scs, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lscs"])
  1077. +fi
  1078. +
  1079. +# BLAS in SGIMATH library?
  1080. +if test $ax_blas_ok = no; then
  1081. + AC_CHECK_LIB(complib.sgimath, $sgemm,
  1082. + [ax_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"])
  1083. +fi
  1084. +
  1085. +# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
  1086. +if test $ax_blas_ok = no; then
  1087. + AC_CHECK_LIB(blas, $sgemm,
  1088. + [AC_CHECK_LIB(essl, $sgemm,
  1089. + [ax_blas_ok=yes; BLAS_LIBS="-lessl -lblas"],
  1090. + [], [-lblas $FLIBS])])
  1091. +fi
  1092. +
  1093. +# Generic BLAS library?
  1094. +if test $ax_blas_ok = no; then
  1095. + AC_CHECK_LIB(blas, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lblas"])
  1096. +fi
  1097. +
  1098. +AC_SUBST(BLAS_LIBS)
  1099. +
  1100. +LIBS="$ax_blas_save_LIBS"
  1101. +
  1102. +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
  1103. +if test x"$ax_blas_ok" = xyes; then
  1104. + ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1])
  1105. + :
  1106. +else
  1107. + ax_blas_ok=no
  1108. + $2
  1109. +fi
  1110. +])dnl AX_BLAS
  1111. diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4
  1112. new file mode 100644
  1113. --- /dev/null
  1114. +++ b/m4/ax_code_coverage.m4
  1115. @@ -0,0 +1,271 @@
  1116. +# ===========================================================================
  1117. +# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html
  1118. +# ===========================================================================
  1119. +#
  1120. +# SYNOPSIS
  1121. +#
  1122. +# AX_CODE_COVERAGE()
  1123. +#
  1124. +# DESCRIPTION
  1125. +#
  1126. +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS,
  1127. +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included
  1128. +# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every
  1129. +# build target (program or library) which should be built with code
  1130. +# coverage support. Also defines CODE_COVERAGE_RULES which should be
  1131. +# substituted in your Makefile; and $enable_code_coverage which can be
  1132. +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined
  1133. +# and substituted, and corresponds to the value of the
  1134. +# --enable-code-coverage option, which defaults to being disabled.
  1135. +#
  1136. +# Test also for gcov program and create GCOV variable that could be
  1137. +# substituted.
  1138. +#
  1139. +# Note that all optimization flags in CFLAGS must be disabled when code
  1140. +# coverage is enabled.
  1141. +#
  1142. +# Usage example:
  1143. +#
  1144. +# configure.ac:
  1145. +#
  1146. +# AX_CODE_COVERAGE
  1147. +#
  1148. +# Makefile.am:
  1149. +#
  1150. +# @CODE_COVERAGE_RULES@
  1151. +# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ...
  1152. +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ...
  1153. +# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ...
  1154. +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ...
  1155. +#
  1156. +# This results in a "check-code-coverage" rule being added to any
  1157. +# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module
  1158. +# has been configured with --enable-code-coverage). Running `make
  1159. +# check-code-coverage` in that directory will run the module's test suite
  1160. +# (`make check`) and build a code coverage report detailing the code which
  1161. +# was touched, then print the URI for the report.
  1162. +#
  1163. +# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined
  1164. +# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of
  1165. +# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is
  1166. +# deprecated. They have the same value.
  1167. +#
  1168. +# This code was derived from Makefile.decl in GLib, originally licenced
  1169. +# under LGPLv2.1+.
  1170. +#
  1171. +# LICENSE
  1172. +#
  1173. +# Copyright (c) 2012, 2016 Philip Withnall
  1174. +# Copyright (c) 2012 Xan Lopez
  1175. +# Copyright (c) 2012 Christian Persch
  1176. +# Copyright (c) 2012 Paolo Borelli
  1177. +# Copyright (c) 2012 Dan Winship
  1178. +# Copyright (c) 2015 Bastien ROUCARIES
  1179. +#
  1180. +# This library is free software; you can redistribute it and/or modify it
  1181. +# under the terms of the GNU Lesser General Public License as published by
  1182. +# the Free Software Foundation; either version 2.1 of the License, or (at
  1183. +# your option) any later version.
  1184. +#
  1185. +# This library is distributed in the hope that it will be useful, but
  1186. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  1187. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
  1188. +# General Public License for more details.
  1189. +#
  1190. +# You should have received a copy of the GNU Lesser General Public License
  1191. +# along with this program. If not, see <https://www.gnu.org/licenses/>.
  1192. +
  1193. +#serial 27
  1194. +
  1195. +AC_DEFUN([_AX_CODE_COVERAGE_ENABLED],[
  1196. + # check for gcov
  1197. + AC_CHECK_TOOL([GCOV],
  1198. + [$_AX_CODE_COVERAGE_GCOV_PROG_WITH],
  1199. + [:])
  1200. + AS_IF([test "X$GCOV" = "X:"],
  1201. + [AC_MSG_ERROR([gcov is needed to do coverage])])
  1202. + AC_SUBST([GCOV])
  1203. +
  1204. + dnl Check if gcc is being used
  1205. + AS_IF([ test "$GCC" = "no" ], [
  1206. + AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
  1207. + ])
  1208. +
  1209. + AC_CHECK_PROG([LCOV], [lcov], [lcov])
  1210. + AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
  1211. +
  1212. + AS_IF([ test x"$LCOV" = x ], [
  1213. + AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed])
  1214. + ])
  1215. +
  1216. + AS_IF([ test x"$GENHTML" = x ], [
  1217. + AC_MSG_ERROR([Could not find genhtml from the lcov package])
  1218. + ])
  1219. +
  1220. + dnl Build the code coverage flags
  1221. + dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility
  1222. + CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
  1223. + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
  1224. + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
  1225. + CODE_COVERAGE_LIBS="-lgcov"
  1226. + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS"
  1227. +
  1228. + AC_SUBST([CODE_COVERAGE_CPPFLAGS])
  1229. + AC_SUBST([CODE_COVERAGE_CFLAGS])
  1230. + AC_SUBST([CODE_COVERAGE_CXXFLAGS])
  1231. + AC_SUBST([CODE_COVERAGE_LIBS])
  1232. + AC_SUBST([CODE_COVERAGE_LDFLAGS])
  1233. +
  1234. + [CODE_COVERAGE_RULES_CHECK='
  1235. + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
  1236. + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
  1237. +']
  1238. + [CODE_COVERAGE_RULES_CAPTURE='
  1239. + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)
  1240. + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS)
  1241. + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
  1242. + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
  1243. + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
  1244. +']
  1245. + [CODE_COVERAGE_RULES_CLEAN='
  1246. +clean: code-coverage-clean
  1247. +distclean: code-coverage-clean
  1248. +code-coverage-clean:
  1249. + -$(LCOV) --directory $(top_builddir) -z
  1250. + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
  1251. + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete
  1252. +']
  1253. +])
  1254. +
  1255. +AC_DEFUN([_AX_CODE_COVERAGE_DISABLED],[
  1256. + [CODE_COVERAGE_RULES_CHECK='
  1257. + @echo "Need to reconfigure with --enable-code-coverage"
  1258. + ']
  1259. + CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK"
  1260. + CODE_COVERAGE_RULES_CLEAN=''
  1261. +])
  1262. +
  1263. +AC_DEFUN([AX_CODE_COVERAGE],[
  1264. + dnl Check for --enable-code-coverage
  1265. +
  1266. + # allow to override gcov location
  1267. + AC_ARG_WITH([gcov],
  1268. + [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])],
  1269. + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov],
  1270. + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov])
  1271. +
  1272. + AC_MSG_CHECKING([whether to build with code coverage support])
  1273. + AC_ARG_ENABLE([code-coverage],
  1274. + AS_HELP_STRING([--enable-code-coverage],
  1275. + [Whether to enable code coverage support]),,
  1276. + enable_code_coverage=no)
  1277. +
  1278. + AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test "x$enable_code_coverage" = xyes])
  1279. + AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
  1280. + AC_MSG_RESULT($enable_code_coverage)
  1281. +
  1282. + AS_IF([ test "x$enable_code_coverage" = xyes ], [
  1283. + _AX_CODE_COVERAGE_ENABLED
  1284. + ], [
  1285. + _AX_CODE_COVERAGE_DISABLED
  1286. + ])
  1287. +
  1288. +[CODE_COVERAGE_RULES='
  1289. +# Code coverage
  1290. +#
  1291. +# Optional:
  1292. +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
  1293. +# Multiple directories may be specified, separated by whitespace.
  1294. +# (Default: $(top_builddir))
  1295. +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
  1296. +# by lcov for code coverage. (Default:
  1297. +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
  1298. +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
  1299. +# reports to be created. (Default:
  1300. +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
  1301. +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,
  1302. +# set to 0 to disable it and leave empty to stay with the default.
  1303. +# (Default: empty)
  1304. +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov
  1305. +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
  1306. +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov
  1307. +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
  1308. +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
  1309. +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the
  1310. +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
  1311. +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov
  1312. +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
  1313. +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering
  1314. +# lcov instance. (Default: empty)
  1315. +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov
  1316. +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
  1317. +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the
  1318. +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
  1319. +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
  1320. +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
  1321. +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
  1322. +#
  1323. +# The generated report will be titled using the $(PACKAGE_NAME) and
  1324. +# $(PACKAGE_VERSION). In order to add the current git hash to the title,
  1325. +# use the git-version-gen script, available online.
  1326. +
  1327. +# Optional variables
  1328. +CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
  1329. +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
  1330. +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
  1331. +CODE_COVERAGE_BRANCH_COVERAGE ?=
  1332. +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
  1333. +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
  1334. +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
  1335. +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
  1336. +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
  1337. +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
  1338. +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=
  1339. +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
  1340. +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
  1341. +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
  1342. +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
  1343. +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
  1344. +CODE_COVERAGE_IGNORE_PATTERN ?=
  1345. +
  1346. +GITIGNOREFILES ?=
  1347. +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
  1348. +
  1349. +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
  1350. +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
  1351. +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\
  1352. + $(CODE_COVERAGE_OUTPUT_FILE);
  1353. +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))
  1354. +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))
  1355. +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\
  1356. + $(CODE_COVERAGE_IGNORE_PATTERN);
  1357. +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))
  1358. +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))
  1359. +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY);
  1360. +code_coverage_quiet = $(code_coverage_quiet_$(V))
  1361. +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
  1362. +code_coverage_quiet_0 = --quiet
  1363. +
  1364. +# sanitizes the test-name: replaces with underscores: dashes and dots
  1365. +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))
  1366. +
  1367. +# Use recursive makes in order to ignore errors during check
  1368. +check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"'
  1369. +
  1370. +# Capture code coverage data
  1371. +code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"'
  1372. +
  1373. +# Hook rule executed before code-coverage-capture, overridable by the user
  1374. +code-coverage-capture-hook:
  1375. +
  1376. +'"$CODE_COVERAGE_RULES_CLEAN"'
  1377. +
  1378. +A''M_DISTCHECK_CONFIGURE_FLAGS ?=
  1379. +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
  1380. +
  1381. +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
  1382. +']
  1383. +
  1384. + AC_SUBST([CODE_COVERAGE_RULES])
  1385. + m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])])
  1386. +])
  1387. diff --git a/umfpack.pc.in b/umfpack.pc.in
  1388. new file mode 100644
  1389. --- /dev/null
  1390. +++ b/umfpack.pc.in
  1391. @@ -0,0 +1,13 @@
  1392. +prefix=@prefix@
  1393. +exec_prefix=@exec_prefix@
  1394. +libdir=@libdir@
  1395. +includedir=@includedir@
  1396. +
  1397. +Name: @PACKAGE_NAME@
  1398. +Description: Sparse multifrontal LU factorization
  1399. +Version: @PACKAGE_VERSION@
  1400. +URL: @PACKAGE_URL@
  1401. +Requires.private: @UMFPACK_REQUIRES@
  1402. +Libs: -L${libdir} -lumfpack
  1403. +Libs.private: @BLAS_LIBS@ -lm
  1404. +Cflags: -I${includedir}/umfpack