autoconfiscate.diff 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350
  1. diff --git a/Check/Makefile.am b/Check/Makefile.am
  2. new file mode 100644
  3. --- /dev/null
  4. +++ b/Check/Makefile.am
  5. @@ -0,0 +1,27 @@
  6. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  7. +
  8. +EXTRA_DIST = \
  9. + lesser.txt
  10. +
  11. +CHECKSRC = \
  12. + cholmod_check.c \
  13. + cholmod_read.c \
  14. + cholmod_write.c
  15. +
  16. +noinst_LTLIBRARIES = \
  17. + libchecki.la \
  18. + libcheckl.la \
  19. + libcheck.la
  20. +
  21. +libchecki_la_SOURCES = $(CHECKSRC)
  22. +libchecki_la_LIBADD = $(SUITESPARSECONFIG_LIBS) $(CODE_COVERAGE_LIBS)
  23. +libchecki_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  24. +libchecki_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  25. +
  26. +libcheckl_la_SOURCES = $(CHECKSRC)
  27. +libcheckl_la_LIBADD = $(SUITESPARSECONFIG_LIBS) $(CODE_COVERAGE_LIBS)
  28. +libcheckl_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  29. +libcheckl_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  30. +
  31. +libcheck_la_SOURCES =
  32. +libcheck_la_LIBADD = libchecki.la libcheckl.la
  33. diff --git a/Cholesky/Makefile.am b/Cholesky/Makefile.am
  34. new file mode 100644
  35. --- /dev/null
  36. +++ b/Cholesky/Makefile.am
  37. @@ -0,0 +1,42 @@
  38. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(COLAMD_CFLAGS) $(AMD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS)
  39. +
  40. +EXTRA_DIST = \
  41. + lesser.txt
  42. +
  43. +CHOLESKYSRC = \
  44. + cholmod_amd.c \
  45. + cholmod_analyze.c \
  46. + cholmod_colamd.c \
  47. + cholmod_etree.c \
  48. + cholmod_factorize.c \
  49. + cholmod_postorder.c \
  50. + cholmod_rcond.c \
  51. + cholmod_resymbol.c \
  52. + cholmod_rowcolcounts.c \
  53. + cholmod_rowfac.c \
  54. + cholmod_solve.c \
  55. + cholmod_spsolve.c
  56. +
  57. +noinst_HEADERS = \
  58. + t_cholmod_lsolve.c \
  59. + t_cholmod_ltsolve.c \
  60. + t_cholmod_rowfac.c \
  61. + t_cholmod_solve.c
  62. +
  63. +noinst_LTLIBRARIES = \
  64. + libcholeskyi.la \
  65. + libcholeskyl.la \
  66. + libcholesky.la
  67. +
  68. +libcholeskyi_la_SOURCES = $(CHOLESKYSRC)
  69. +libcholeskyi_la_LIBADD = $(COLAMD_LIBS) $(AMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  70. +libcholeskyi_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  71. +libcholeskyi_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  72. +
  73. +libcholeskyl_la_SOURCES = $(CHOLESKYSRC)
  74. +libcholeskyl_la_LIBADD = $(COLAMD_LIBS) $(AMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  75. +libcholeskyl_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  76. +libcholeskyl_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  77. +
  78. +libcholesky_la_SOURCES =
  79. +libcholesky_la_LIBADD = libcholeskyi.la libcholeskyl.la
  80. diff --git a/Core/Makefile.am b/Core/Makefile.am
  81. new file mode 100644
  82. --- /dev/null
  83. +++ b/Core/Makefile.am
  84. @@ -0,0 +1,45 @@
  85. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  86. +
  87. +EXTRA_DIST = \
  88. + lesser.txt
  89. +
  90. +CORESRC = \
  91. + cholmod_aat.c \
  92. + cholmod_add.c \
  93. + cholmod_band.c \
  94. + cholmod_change_factor.c \
  95. + cholmod_common.c \
  96. + cholmod_complex.c \
  97. + cholmod_copy.c \
  98. + cholmod_dense.c \
  99. + cholmod_error.c \
  100. + cholmod_factor.c \
  101. + cholmod_memory.c \
  102. + cholmod_sparse.c \
  103. + cholmod_transpose.c \
  104. + cholmod_triplet.c \
  105. + cholmod_version.c
  106. +
  107. +noinst_HEADERS = \
  108. + t_cholmod_change_factor.c \
  109. + t_cholmod_dense.c \
  110. + t_cholmod_transpose.c \
  111. + t_cholmod_triplet.c
  112. +
  113. +noinst_LTLIBRARIES = \
  114. + libcorei.la \
  115. + libcorel.la \
  116. + libcore.la
  117. +
  118. +libcorei_la_SOURCES = $(CORESRC)
  119. +libcorei_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  120. +libcorei_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  121. +libcorei_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  122. +
  123. +libcorel_la_SOURCES = $(CORESRC)
  124. +libcorel_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  125. +libcorel_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  126. +libcorel_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  127. +
  128. +libcore_la_SOURCES =
  129. +libcore_la_LIBADD = libcorei.la libcorel.la
  130. diff --git a/Demo/Makefile.am b/Demo/Makefile.am
  131. new file mode 100644
  132. --- /dev/null
  133. +++ b/Demo/Makefile.am
  134. @@ -0,0 +1,142 @@
  135. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  136. +
  137. +EXTRA_DIST = \
  138. + README.txt \
  139. + gpl.txt
  140. +
  141. +dist_noinst_DATA = \
  142. + Matrix/0.tri \
  143. + Matrix/bcsstk01.tri \
  144. + Matrix/bcsstk02.tri \
  145. + Matrix/c.mtx \
  146. + Matrix/c.tri \
  147. + Matrix/can___24.mtx \
  148. + Matrix/d.tri \
  149. + Matrix/empty.tri \
  150. + Matrix/lp_afiro.tri \
  151. + Matrix/mangle1.mtx \
  152. + Matrix/mangle2.mtx \
  153. + Matrix/mangle3.mtx \
  154. + Matrix/mangle4.mtx \
  155. + Matrix/mangle5.tri \
  156. + Matrix/mangle6.tri \
  157. + Matrix/mangle7.tri \
  158. + Matrix/mangle8.tri \
  159. + Matrix/one.tri \
  160. + Matrix/pts5ldd03.mtx \
  161. + Matrix/up.tri
  162. +
  163. +noinst_PROGRAMS = \
  164. + reade \
  165. + readhb \
  166. + readhb2
  167. +
  168. +reade_SOURCES = reade.f
  169. +readhb_SOURCES = readhb.f
  170. +readhb2_SOURCES = readhb2.f
  171. +
  172. +if MOD_CHECK
  173. +if MOD_CHOLESKY
  174. +
  175. +check_PROGRAMS = \
  176. + cholmod_demo \
  177. + cholmod_l_demo \
  178. + cholmod_simple
  179. +
  180. +cholmod_demo_SOURCES = cholmod_demo.c cholmod_demo.h
  181. +cholmod_demo_LDADD = $(top_builddir)/libcholmod.la $(SUITESPARSECONFIG_LIBS)
  182. +
  183. +cholmod_l_demo_SOURCES = cholmod_l_demo.c cholmod_demo.h
  184. +cholmod_l_demo_LDADD = $(top_builddir)/libcholmod.la $(SUITESPARSECONFIG_LIBS)
  185. +cholmod_l_demo_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  186. +
  187. +cholmod_simple_SOURCES = cholmod_simple.c
  188. +cholmod_simple_LDADD = $(top_builddir)/libcholmod.la
  189. +
  190. +if !CODE_COVERAGE_ENABLED
  191. +MATRICES = \
  192. + $(srcdir)/Matrix/bcsstk01.tri \
  193. + $(srcdir)/Matrix/c.tri \
  194. + $(srcdir)/Matrix/can___24.mtx \
  195. + $(srcdir)/Matrix/lp_afiro.tri
  196. +
  197. +check-local: $(check_PROGRAMS) $(MATRICES)
  198. + ./cholmod_demo < $(srcdir)/Matrix/bcsstk01.tri
  199. + ./cholmod_l_demo < $(srcdir)/Matrix/bcsstk01.tri
  200. + ./cholmod_demo < $(srcdir)/Matrix/lp_afiro.tri
  201. + ./cholmod_l_demo < $(srcdir)/Matrix/lp_afiro.tri
  202. + ./cholmod_demo < $(srcdir)/Matrix/can___24.mtx
  203. + ./cholmod_l_demo < $(srcdir)/Matrix/can___24.mtx
  204. + ./cholmod_demo < $(srcdir)/Matrix/c.tri
  205. + ./cholmod_l_demo < $(srcdir)/Matrix/c.tri
  206. + ./cholmod_simple < $(srcdir)/Matrix/c.tri
  207. + ./cholmod_simple < $(srcdir)/Matrix/can___24.mtx
  208. + ./cholmod_simple < $(srcdir)/Matrix/bcsstk01.tri
  209. +
  210. +else
  211. +MATRICES = \
  212. + $(srcdir)/Matrix/0.tri \
  213. + $(srcdir)/Matrix/bcsstk01.tri \
  214. + $(srcdir)/Matrix/bcsstk02.tri \
  215. + $(srcdir)/Matrix/c.mtx \
  216. + $(srcdir)/Matrix/c.tri \
  217. + $(srcdir)/Matrix/can___24.mtx \
  218. + $(srcdir)/Matrix/d.tri \
  219. + $(srcdir)/Matrix/lp_afiro.tri \
  220. + $(srcdir)/Matrix/mangle1.mtx \
  221. + $(srcdir)/Matrix/mangle2.mtx \
  222. + $(srcdir)/Matrix/mangle3.mtx \
  223. + $(srcdir)/Matrix/mangle4.mtx \
  224. + $(srcdir)/Matrix/pts5ldd03.mtx \
  225. + $(srcdir)/Matrix/up.tri \
  226. + $(top_srcdir)/Tcov/Matrix/3_2 \
  227. + $(top_srcdir)/Tcov/Matrix/c10 \
  228. + $(top_srcdir)/Tcov/Matrix/c5lo
  229. +
  230. +check-local: $(check_PROGRAMS) $(MATRICES)
  231. + ./cholmod_demo $(srcdir)/Matrix/bcsstk01.tri > demo_k1.out
  232. + ./cholmod_demo $(srcdir)/Matrix/bcsstk02.tri > demo_k2.out
  233. + ./cholmod_demo < $(srcdir)/Matrix/lp_afiro.tri > demo_afiro.out
  234. + ./cholmod_demo < $(srcdir)/Matrix/can___24.mtx > demo_can24.out
  235. + ./cholmod_demo < $(srcdir)/Matrix/c.tri > demo_c.out
  236. + ./cholmod_demo < $(srcdir)/Matrix/d.tri > demo_d.out
  237. + ./cholmod_demo < $(srcdir)/Matrix/up.tri > demo_up.out
  238. + ./cholmod_demo < $(srcdir)/Matrix/c.mtx > demo_c_mtx.out
  239. + ./cholmod_demo < $(srcdir)/Matrix/0.tri > demo_0.out
  240. + ./cholmod_demo < $(top_srcdir)/Tcov/Matrix/3_2 > demo_3_2.out
  241. + ./cholmod_demo < $(top_srcdir)/Tcov/Matrix/c5lo > demo_c5lo.out
  242. + ./cholmod_demo < $(top_srcdir)/Tcov/Matrix/c10 > demo_c10.out
  243. + ./cholmod_demo no_such_file > demo_no_such_file.out
  244. + ./cholmod_demo $(srcdir)/Matrix/mangle1.mtx > demo_mangle1.out
  245. + ./cholmod_demo $(srcdir)/Matrix/mangle2.mtx > demo_mangle2.out
  246. + ./cholmod_demo $(srcdir)/Matrix/mangle3.mtx > demo_mangle3.out
  247. + ./cholmod_demo $(srcdir)/Matrix/mangle4.mtx > demo_mangle4.out
  248. + ./cholmod_demo $(srcdir)/Matrix/pts5ldd03.mtx > demo_pts5ldd03.out
  249. + ./cholmod_l_demo $(srcdir)/Matrix/bcsstk01.tri > ldemo_k1.out
  250. + ./cholmod_l_demo $(srcdir)/Matrix/bcsstk02.tri > ldemo_k2.out
  251. + ./cholmod_l_demo < $(srcdir)/Matrix/lp_afiro.tri > ldemo_afiro.out
  252. + ./cholmod_l_demo < $(srcdir)/Matrix/can___24.mtx > ldemo_can24.out
  253. + ./cholmod_l_demo < $(srcdir)/Matrix/c.tri > ldemo_c.out
  254. + ./cholmod_l_demo $(srcdir)/Matrix/c.tri 1 > ldemo_c_zomplex.out
  255. + ./cholmod_l_demo < $(srcdir)/Matrix/d.tri > ldemo_d.out
  256. + ./cholmod_l_demo $(srcdir)/Matrix/d.tri 1 > ldemo_d.out
  257. + ./cholmod_l_demo < $(srcdir)/Matrix/up.tri > ldemo_up.out
  258. + ./cholmod_l_demo $(srcdir)/Matrix/up.tri 1 > ldemo_up_zomplex.out
  259. + ./cholmod_l_demo < $(srcdir)/Matrix/c.mtx > ldemo_c_mtx.out
  260. + ./cholmod_l_demo $(srcdir)/Matrix/c.mtx 1 > ldemo_c_mtx_zomplex.out
  261. + ./cholmod_l_demo < $(srcdir)/Matrix/0.tri > ldemo_0.out
  262. + ./cholmod_l_demo < $(top_srcdir)/Tcov/Matrix/3_2 > ldemo_3_2.out
  263. + ./cholmod_l_demo < $(top_srcdir)/Tcov/Matrix/c5lo > ldemo_c5lo.out
  264. + ./cholmod_l_demo < $(top_srcdir)/Tcov/Matrix/c10 > ldemo_c10.out
  265. + ./cholmod_l_demo no_such_file > ldemo_no_such_file.out
  266. + ./cholmod_l_demo $(srcdir)/Matrix/mangle1.mtx > ldemo_mangle1.out
  267. + ./cholmod_l_demo $(srcdir)/Matrix/mangle2.mtx > ldemo_mangle2.out
  268. + ./cholmod_l_demo $(srcdir)/Matrix/mangle3.mtx > ldemo_mangle3.out
  269. + ./cholmod_l_demo $(srcdir)/Matrix/mangle4.mtx > ldemo_mangle4.out
  270. + ./cholmod_l_demo $(srcdir)/Matrix/pts5ldd03.mtx > ldemo_pts5ldd03.out
  271. +endif
  272. +
  273. +endif
  274. +endif
  275. +
  276. +CLEANFILES = timelog.m *.out
  277. diff --git a/Doc/Makefile.am b/Doc/Makefile.am
  278. new file mode 100644
  279. --- /dev/null
  280. +++ b/Doc/Makefile.am
  281. @@ -0,0 +1,442 @@
  282. +EXTRA_DIST = \
  283. + ChangeLog \
  284. + License.txt
  285. +
  286. +dist_noinst_DATA = \
  287. + UserGuide.bib \
  288. + CHOLMOD_UserGuide.tex \
  289. + header.tex \
  290. + footer.tex \
  291. + mheader.tex \
  292. + mfooter.tex \
  293. + mfile.awk \
  294. + rule.awk
  295. +
  296. +dist_pdf_DATA = \
  297. + CHOLMOD_UserGuide.pdf
  298. +
  299. +dist_noinst_SCRIPTS = \
  300. + getmproto \
  301. + getproto
  302. +
  303. +# ./getmproto file.m > _file_m.tex
  304. +define getmproto =
  305. +( \
  306. +cat $(srcdir)/mheader.tex; \
  307. +expand -8 $< | awk -f $(srcdir)/mfile.awk; \
  308. +cat $(srcdir)/mfooter.tex; \
  309. +) > $@
  310. +endef
  311. +
  312. +# ./getproto 'proto' header.h > _file.tex
  313. +define getproto =
  314. +( \
  315. +echo -n $(PATTERN); \
  316. +cat $(srcdir)/rule.awk; \
  317. +) > $(basename $@).awk
  318. +( \
  319. +cat $(srcdir)/header.tex; \
  320. +expand -8 $< | awk -f $(basename $@).awk; \
  321. +cat $(srcdir)/footer.tex; \
  322. +) > $@
  323. +$(RM) $(basename $@).awk
  324. +endef
  325. +
  326. +PROTO_M = \
  327. + _analyze_m.tex \
  328. + _bisect_m.tex \
  329. + _chol2_m.tex \
  330. + _cholmod2_m.tex \
  331. + _cholmod_demo_m.tex \
  332. + _cholmod_make_m.tex \
  333. + _etree2_m.tex \
  334. + _graph_demo_m.tex \
  335. + _lchol_m.tex \
  336. + _ldl_normest_m.tex \
  337. + _ldlchol_m.tex \
  338. + _ldlsolve_m.tex \
  339. + _ldlsplit_m.tex \
  340. + _ldlupdate_m.tex \
  341. + _ldlrowmod_m.tex \
  342. + _metis_m.tex \
  343. + _mread_m.tex \
  344. + _mwrite_m.tex \
  345. + _nesdis_m.tex \
  346. + _resymbol_m.tex \
  347. + _sdmult_m.tex \
  348. + _sparse2_m.tex \
  349. + _spsym_m.tex \
  350. + _symbfact2_m.tex
  351. +
  352. +$(PROTO_M): mheader.tex mfile.awk mfooter.tex
  353. +_%_m.tex: $(top_srcdir)/MATLAB/%.m
  354. + $(getmproto)
  355. +
  356. +PROTO_SIMPLE = \
  357. + _simple.tex
  358. +
  359. +_simple.tex: PATTERN = '/include/, /^}/'
  360. +
  361. +$(PROTO_SIMPLE): $(top_srcdir)/Demo/cholmod_simple.c header.tex rule.awk footer.tex
  362. + $(getproto)
  363. +
  364. +PROTO_CORE = \
  365. + _common.tex \
  366. + _start.tex \
  367. + _finish.tex \
  368. + _defaults.tex \
  369. + _maxrank.tex \
  370. + _allocate_work.tex \
  371. + _free_work.tex \
  372. + _clear_flag.tex \
  373. + _error.tex \
  374. + _dbound.tex \
  375. + _hypot.tex \
  376. + _divcomplex.tex \
  377. + _sparse.tex \
  378. + _allocate_sparse.tex \
  379. + _free_sparse.tex \
  380. + _reallocate_sparse.tex \
  381. + _nnz.tex \
  382. + _speye.tex \
  383. + _spzeros.tex \
  384. + _transpose.tex \
  385. + _transpose_unsym.tex \
  386. + _transpose_sym.tex \
  387. + _ptranspose.tex \
  388. + _sort.tex \
  389. + _band.tex \
  390. + _band_inplace.tex \
  391. + _aat.tex \
  392. + _copy_sparse.tex \
  393. + _copy.tex \
  394. + _add.tex \
  395. + _sparse_xtype.tex \
  396. + _factor.tex \
  397. + _allocate_factor.tex \
  398. + _free_factor.tex \
  399. + _reallocate_factor.tex \
  400. + _change_factor.tex \
  401. + _pack_factor.tex \
  402. + _reallocate_column.tex \
  403. + _factor_to_sparse.tex \
  404. + _copy_factor.tex \
  405. + _factor_xtype.tex \
  406. + _dense.tex \
  407. + _allocate_dense.tex \
  408. + _ensure_dense.tex \
  409. + _zeros.tex \
  410. + _ones.tex \
  411. + _eye.tex \
  412. + _free_dense.tex \
  413. + _sparse_to_dense.tex \
  414. + _dense_to_sparse.tex \
  415. + _copy_dense.tex \
  416. + _copy_dense2.tex \
  417. + _dense_xtype.tex \
  418. + _triplet.tex \
  419. + _allocate_triplet.tex \
  420. + _free_triplet.tex \
  421. + _reallocate_triplet.tex \
  422. + _sparse_to_triplet.tex \
  423. + _triplet_to_sparse.tex \
  424. + _copy_triplet.tex \
  425. + _triplet_xtype.tex \
  426. + _malloc.tex \
  427. + _calloc.tex \
  428. + _free.tex \
  429. + _realloc.tex \
  430. + _realloc_multiple.tex \
  431. + _version.tex \
  432. + _defn.tex
  433. +
  434. +_common.tex: PATTERN = '/typedef struct cholmod_common/, /^}/'
  435. +_start.tex: PATTERN = '/int cholmod_start/, /\*\) ;/'
  436. +_finish.tex: PATTERN = '/int cholmod_finish/, /\*\) ;/'
  437. +_defaults.tex: PATTERN = '/int cholmod_defaults/, /\*\) ;/'
  438. +_maxrank.tex: PATTERN = '/size_t cholmod_maxrank/, /\*\) ;/'
  439. +_allocate_work.tex: PATTERN = '/int cholmod_allocate_work/, /\*\) ;/'
  440. +_free_work.tex: PATTERN = '/int cholmod_free_work/, /\*\) ;/'
  441. +_clear_flag.tex: PATTERN = '/long cholmod_clear_flag/, /\*\) ;/'
  442. +_error.tex: PATTERN = '/int cholmod_error/, /\*\) ;/'
  443. +_dbound.tex: PATTERN = '/double cholmod_dbound/, /\*\) ;/'
  444. +_hypot.tex: PATTERN = '/double cholmod_hypot/, /double\) ;/'
  445. +_divcomplex.tex: PATTERN = '/int cholmod_divcomplex/, /\*\) ;/'
  446. +_sparse.tex: PATTERN = '/typedef struct cholmod_sparse/, /^}/'
  447. +_allocate_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_allocate_sparse/, /\*\) ;/'
  448. +_free_sparse.tex: PATTERN = '/int cholmod_free_sparse/, /\*\) ;/'
  449. +_reallocate_sparse.tex: PATTERN = '/int cholmod_reallocate_sparse/, /\*\) ;/'
  450. +_nnz.tex: PATTERN = '/long cholmod_nnz/, /\*\) ;/'
  451. +_speye.tex: PATTERN = '/cholmod_sparse \*cholmod_speye/, /\*\) ;/'
  452. +_spzeros.tex: PATTERN = '/cholmod_sparse \*cholmod_spzeros/, /\*\) ;/'
  453. +_transpose.tex: PATTERN = '/cholmod_sparse \*cholmod_transpose/, /\*\) ;/'
  454. +_transpose_unsym.tex: PATTERN = '/int cholmod_transpose_unsym/, /\*\) ;/'
  455. +_transpose_sym.tex: PATTERN = '/int cholmod_transpose_sym/, /\*\) ;/'
  456. +_ptranspose.tex: PATTERN = '/cholmod_sparse \*cholmod_ptranspose/, /\*\) ;/'
  457. +_sort.tex: PATTERN = '/int cholmod_sort/, /\*\) ;/'
  458. +_band.tex: PATTERN = '/cholmod_sparse \*cholmod_band/, /\*\) ;/'
  459. +_band_inplace.tex: PATTERN = '/int cholmod_band_inplace/, /\*\) ;/'
  460. +_aat.tex: PATTERN = '/cholmod_sparse \*cholmod_aat/, /\*\) ;/'
  461. +_copy_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_copy_sparse/, /\*\) ;/'
  462. +_copy.tex: PATTERN = '/cholmod_sparse \*cholmod_copy /, /\*\) ;/'
  463. +_add.tex: PATTERN = '/cholmod_sparse \*cholmod_add/, /\*\) ;/'
  464. +_sparse_xtype.tex: PATTERN = '/int cholmod_sparse_xtype/, /\*\) ;/'
  465. +_factor.tex: PATTERN = '/typedef struct cholmod_factor/, /^}/'
  466. +_allocate_factor.tex: PATTERN = '/cholmod_factor \*cholmod_allocate_factor/, /\*\) ;/'
  467. +_free_factor.tex: PATTERN = '/int cholmod_free_factor/, /\*\) ;/'
  468. +_reallocate_factor.tex: PATTERN = '/int cholmod_reallocate_factor/, /\*\) ;/'
  469. +_change_factor.tex: PATTERN = '/int cholmod_change_factor/, /\*\) ;/'
  470. +_pack_factor.tex: PATTERN = '/int cholmod_pack_factor/, /\*\) ;/'
  471. +_reallocate_column.tex: PATTERN = '/int cholmod_reallocate_column/, /\*\) ;/'
  472. +_factor_to_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_factor_to_sparse/, /\*\) ;/'
  473. +_copy_factor.tex: PATTERN = '/cholmod_factor \*cholmod_copy_factor/, /\*\) ;/'
  474. +_factor_xtype.tex: PATTERN = '/int cholmod_factor_xtype/, /\*\) ;/'
  475. +_dense.tex: PATTERN = '/typedef struct cholmod_dense/, /^}/'
  476. +_allocate_dense.tex: PATTERN = '/cholmod_dense \*cholmod_allocate_dense/, /\*\) ;/'
  477. +_ensure_dense.tex: PATTERN = '/cholmod_dense \*cholmod_ensure_dense/, /\*\) ;/'
  478. +_zeros.tex: PATTERN = '/cholmod_dense \*cholmod_zeros/, /\*\) ;/'
  479. +_ones.tex: PATTERN = '/cholmod_dense \*cholmod_ones/, /\*\) ;/'
  480. +_eye.tex: PATTERN = '/cholmod_dense \*cholmod_eye/, /\*\) ;/'
  481. +_free_dense.tex: PATTERN = '/int cholmod_free_dense/, /\*\) ;/'
  482. +_sparse_to_dense.tex: PATTERN = '/cholmod_dense \*cholmod_sparse_to_dense/, /\*\) ;/'
  483. +_dense_to_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_dense_to_sparse/, /\*\) ;/'
  484. +_copy_dense.tex: PATTERN = '/cholmod_dense \*cholmod_copy_dense/, /\*\) ;/'
  485. +_copy_dense2.tex: PATTERN = '/int cholmod_copy_dense2/, /\*\) ;/'
  486. +_dense_xtype.tex: PATTERN = '/int cholmod_dense_xtype/, /\*\) ;/'
  487. +_triplet.tex: PATTERN = '/typedef struct cholmod_triplet/, /^}/'
  488. +_allocate_triplet.tex: PATTERN = '/cholmod_triplet \*cholmod_allocate_triplet/, /\*\) ;/'
  489. +_free_triplet.tex: PATTERN = '/int cholmod_free_triplet/, /\*\) ;/'
  490. +_reallocate_triplet.tex: PATTERN = '/int cholmod_reallocate_triplet/, /\*\) ;/'
  491. +_sparse_to_triplet.tex: PATTERN = '/cholmod_triplet \*cholmod_sparse_to_triplet/, /\*\) ;/'
  492. +_triplet_to_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_triplet_to_sparse/, /\*\) ;/'
  493. +_copy_triplet.tex: PATTERN = '/cholmod_triplet \*cholmod_copy_triplet/, /\*\) ;/'
  494. +_triplet_xtype.tex: PATTERN = '/int cholmod_triplet_xtype/, /\*\) ;/'
  495. +_malloc.tex: PATTERN = '/void \*cholmod_malloc/, /\*\) ;/'
  496. +_calloc.tex: PATTERN = '/void \*cholmod_calloc/, /\*\) ;/'
  497. +_free.tex: PATTERN = '/void \*cholmod_free/, /\*\) ;/'
  498. +_realloc.tex: PATTERN = '/void \*cholmod_realloc/, /\*\) ;/'
  499. +_realloc_multiple.tex: PATTERN = '/int cholmod_realloc_multiple/, /\*\) ;/'
  500. +_version.tex: PATTERN = '/int cholmod_version/, /l_version/'
  501. +_defn.tex: PATTERN = '/itype defines the/, /define CHOLMOD_SUPERNODAL/'
  502. +
  503. +$(PROTO_CORE): $(top_srcdir)/Include/cholmod_core.h header.tex rule.awk footer.tex
  504. + $(getproto)
  505. +
  506. +PROTO_CHECK = \
  507. + _check_common.tex \
  508. + _print_common.tex \
  509. + _check_sparse.tex \
  510. + _print_sparse.tex \
  511. + _check_dense.tex \
  512. + _print_dense.tex \
  513. + _check_factor.tex \
  514. + _print_factor.tex \
  515. + _check_triplet.tex \
  516. + _print_triplet.tex \
  517. + _check_subset.tex \
  518. + _print_subset.tex \
  519. + _check_perm.tex \
  520. + _print_perm.tex \
  521. + _check_parent.tex \
  522. + _print_parent.tex \
  523. + _read_triplet.tex \
  524. + _read_sparse.tex \
  525. + _read_dense.tex \
  526. + _read_matrix.tex \
  527. + _write_sparse.tex \
  528. + _write_dense.tex
  529. +
  530. +_check_common.tex: PATTERN = '/int cholmod_check_common/, /\*\) ;/'
  531. +_print_common.tex: PATTERN = '/int cholmod_print_common/, /\*\) ;/'
  532. +_check_sparse.tex: PATTERN = '/int cholmod_check_sparse/, /\*\) ;/'
  533. +_print_sparse.tex: PATTERN = '/int cholmod_print_sparse/, /\*\) ;/'
  534. +_check_dense.tex: PATTERN = '/int cholmod_check_dense/, /\*\) ;/'
  535. +_print_dense.tex: PATTERN = '/int cholmod_print_dense/, /\*\) ;/'
  536. +_check_factor.tex: PATTERN = '/int cholmod_check_factor/, /\*\) ;/'
  537. +_print_factor.tex: PATTERN = '/int cholmod_print_factor/, /\*\) ;/'
  538. +_check_triplet.tex: PATTERN = '/int cholmod_check_triplet/, /\*\) ;/'
  539. +_print_triplet.tex: PATTERN = '/int cholmod_print_triplet/, /\*\) ;/'
  540. +_check_subset.tex: PATTERN = '/int cholmod_check_subset/, /\*\) ;/'
  541. +_print_subset.tex: PATTERN = '/int cholmod_print_subset/, /\*\) ;/'
  542. +_check_perm.tex: PATTERN = '/int cholmod_check_perm/, /\*\) ;/'
  543. +_print_perm.tex: PATTERN = '/int cholmod_print_perm/, /\*\) ;/'
  544. +_check_parent.tex: PATTERN = '/int cholmod_check_parent/, /\*\) ;/'
  545. +_print_parent.tex: PATTERN = '/int cholmod_print_parent/, /\*\) ;/'
  546. +_read_triplet.tex: PATTERN = '/cholmod_triplet \*cholmod_read_triplet/, /\*\) ;/'
  547. +_read_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_read_sparse/, /\*\) ;/'
  548. +_read_dense.tex: PATTERN = '/cholmod_dense \*cholmod_read_dense/, /\*\) ;/'
  549. +_read_matrix.tex: PATTERN = '/void \*cholmod_read_matrix/, /\*\) ;/'
  550. +_write_sparse.tex: PATTERN = '/int cholmod_write_sparse/, /\*\) ;/'
  551. +_write_dense.tex: PATTERN = '/int cholmod_write_dense/, /\*\) ;/'
  552. +
  553. +$(PROTO_CHECK): $(top_srcdir)/Include/cholmod_check.h header.tex rule.awk footer.tex
  554. + $(getproto)
  555. +
  556. +PROTO_CHOLESKY = \
  557. + _analyze.tex \
  558. + _analyze_p.tex \
  559. + _factorize.tex \
  560. + _factorize_p.tex \
  561. + _solve.tex \
  562. + _solve2.tex \
  563. + _spsolve.tex \
  564. + _etree.tex \
  565. + _rowcolcounts.tex \
  566. + _analyze_ordering.tex \
  567. + _amd.tex \
  568. + _colamd.tex \
  569. + _rowfac.tex \
  570. + _rowfac_mask.tex \
  571. + _row_subtree.tex \
  572. + _row_lsubtree.tex \
  573. + _lsolve_pattern.tex \
  574. + _resymbol.tex \
  575. + _resymbol_noperm.tex \
  576. + _rcond.tex \
  577. + _postorder.tex
  578. +
  579. +_analyze.tex: PATTERN = '/cholmod_factor \*cholmod_analyze /, /\*\) ;/'
  580. +_analyze_p.tex: PATTERN = '/cholmod_factor \*cholmod_analyze_p/, /\*\) ;/'
  581. +_factorize.tex: PATTERN = '/int cholmod_factorize /, /\*\) ;/'
  582. +_factorize_p.tex: PATTERN = '/int cholmod_factorize_p/, /\*\) ;/'
  583. +_solve.tex: PATTERN = '/cholmod_dense \*cholmod_solve/, /\*\) ;/'
  584. +_solve2.tex: PATTERN = '/int cholmod_solve2/, /\*\) ;/'
  585. +_spsolve.tex: PATTERN = '/cholmod_sparse \*cholmod_spsolve/, /\*\) ;/'
  586. +_etree.tex: PATTERN = '/int cholmod_etree/, /\*\) ;/'
  587. +_rowcolcounts.tex: PATTERN = '/int cholmod_rowcolcounts/, /\*\) ;/'
  588. +_analyze_ordering.tex: PATTERN = '/int cholmod_analyze_ordering/, /\*\) ;/'
  589. +_amd.tex: PATTERN = '/int cholmod_amd/, /\*\) ;/'
  590. +_colamd.tex: PATTERN = '/int cholmod_colamd/, /\*\) ;/'
  591. +_rowfac.tex: PATTERN = '/int cholmod_rowfac/, /\*\) ;/'
  592. +_rowfac_mask.tex: PATTERN = '/int cholmod_rowfac_mask/, /\*\) ;/'
  593. +_row_subtree.tex: PATTERN = '/int cholmod_row_subtree/, /\*\) ;/'
  594. +_row_lsubtree.tex: PATTERN = '/int cholmod_row_lsubtree/, /\*\) ;/'
  595. +_lsolve_pattern.tex: PATTERN = '/int cholmod_lsolve_pattern/, /\*\) ;/'
  596. +_resymbol.tex: PATTERN = '/int cholmod_resymbol /, /\*\) ;/'
  597. +_resymbol_noperm.tex: PATTERN = '/int cholmod_resymbol_noperm/, /\*\) ;/'
  598. +_rcond.tex: PATTERN = '/double cholmod_rcond/, /\*\) ;/'
  599. +_postorder.tex: PATTERN = '/long cholmod_postorder/, /\*\) ;/'
  600. +
  601. +$(PROTO_CHOLESKY): $(top_srcdir)/Include/cholmod_cholesky.h header.tex rule.awk footer.tex
  602. + $(getproto)
  603. +
  604. +PROTO_MODIFY = \
  605. + _updown.tex \
  606. + _updown_solve.tex \
  607. + _updown_mark.tex \
  608. + _updown_mask.tex \
  609. + _rowadd.tex \
  610. + _rowadd_solve.tex \
  611. + _rowadd_mark.tex \
  612. + _rowdel.tex \
  613. + _rowdel_solve.tex \
  614. + _rowdel_mark.tex
  615. +
  616. +_updown.tex: PATTERN = '/int cholmod_updown /, /\*\) ;/'
  617. +_updown_solve.tex: PATTERN = '/int cholmod_updown_solve/, /\*\) ;/'
  618. +_updown_mark.tex: PATTERN = '/int cholmod_updown_mark/, /\*\) ;/'
  619. +_updown_mask.tex: PATTERN = '/int cholmod_updown_mask/, /\*\) ;/'
  620. +_rowadd.tex: PATTERN = '/int cholmod_rowadd /, /\*\) ;/'
  621. +_rowadd_solve.tex: PATTERN = '/int cholmod_rowadd_solve/, /\*\) ;/'
  622. +_rowadd_mark.tex: PATTERN = '/int cholmod_rowadd_mark/, /\*\) ;/'
  623. +_rowdel.tex: PATTERN = '/int cholmod_rowdel /, /\*\) ;/'
  624. +_rowdel_solve.tex: PATTERN = '/int cholmod_rowdel_solve/, /\*\) ;/'
  625. +_rowdel_mark.tex: PATTERN = '/int cholmod_rowdel_mark/, /\*\) ;/'
  626. +
  627. +$(PROTO_MODIFY): $(top_srcdir)/Include/cholmod_modify.h header.tex rule.awk footer.tex
  628. + $(getproto)
  629. +
  630. +PROTO_MATRIXOPS = \
  631. + _drop.tex \
  632. + _norm_dense.tex \
  633. + _norm_sparse.tex \
  634. + _horzcat.tex \
  635. + _scale.tex \
  636. + _sdmult.tex \
  637. + _ssmult.tex \
  638. + _submatrix.tex \
  639. + _vertcat.tex \
  640. + _symmetry.tex
  641. +
  642. +_drop.tex: PATTERN = '/int cholmod_drop/, /\*\) ;/'
  643. +_norm_dense.tex: PATTERN = '/double cholmod_norm_dense/, /\*\) ;/'
  644. +_norm_sparse.tex: PATTERN = '/double cholmod_norm_sparse/, /\*\) ;/'
  645. +_horzcat.tex: PATTERN = '/cholmod_sparse \*cholmod_horzcat/, /\*\) ;/'
  646. +_scale.tex: PATTERN = '/define CHOLMOD_SCALAR/, /\*\) ;/'
  647. +_sdmult.tex: PATTERN = '/int cholmod_sdmult/, /\*\) ;/'
  648. +_ssmult.tex: PATTERN = '/cholmod_sparse \*cholmod_ssmult/, /\*\) ;/'
  649. +_submatrix.tex: PATTERN = '/cholmod_sparse \*cholmod_submatrix/, /\*\) ;/'
  650. +_vertcat.tex: PATTERN = '/cholmod_sparse \*cholmod_vertcat/, /\*\) ;/'
  651. +_symmetry.tex: PATTERN = '/int cholmod_symmetry/, /\*\) ;/'
  652. +
  653. +$(PROTO_MATRIXOPS): $(top_srcdir)/Include/cholmod_matrixops.h header.tex rule.awk footer.tex
  654. + $(getproto)
  655. +
  656. +PROTO_SUPERNODAL = \
  657. + _super_symbolic.tex \
  658. + _super_numeric.tex \
  659. + _super_lsolve.tex \
  660. + _super_ltsolve.tex
  661. +
  662. +_super_symbolic.tex: PATTERN = '/int cholmod_super_symbolic/, /\*\) ;/'
  663. +_super_numeric.tex: PATTERN = '/int cholmod_super_numeric/, /\*\) ;/'
  664. +_super_lsolve.tex: PATTERN = '/int cholmod_super_lsolve/, /\*\) ;/'
  665. +_super_ltsolve.tex: PATTERN = '/int cholmod_super_ltsolve/, /\*\) ;/'
  666. +
  667. +$(PROTO_SUPERNODAL): $(top_srcdir)/Include/cholmod_supernodal.h header.tex rule.awk footer.tex
  668. + $(getproto)
  669. +
  670. +PROTO_PARTITION = \
  671. + _nested_dissection.tex \
  672. + _metis.tex \
  673. + _ccolamd.tex \
  674. + _camd.tex \
  675. + _csymamd.tex \
  676. + _bisect.tex \
  677. + _metis_bisector.tex \
  678. + _collapse_septree.tex
  679. +
  680. +_nested_dissection.tex: PATTERN = '/long cholmod_nested_dissection/, /\*\) ;/'
  681. +_metis.tex: PATTERN = '/int cholmod_metis/, /\*\) ;/'
  682. +_ccolamd.tex: PATTERN = '/int cholmod_ccolamd/, /\*\) ;/'
  683. +_camd.tex: PATTERN = '/int cholmod_camd/, /\*\) ;/'
  684. +_csymamd.tex: PATTERN = '/int cholmod_csymamd/, /\*\) ;/'
  685. +_bisect.tex: PATTERN = '/long cholmod_bisect/, /\*\) ;/'
  686. +_metis_bisector.tex: PATTERN = '/long cholmod_metis_bisector/, /\*\) ;/'
  687. +_collapse_septree.tex: PATTERN = '/long cholmod_collapse_septree/, /\*\) ;/'
  688. +
  689. +$(PROTO_PARTITION): $(top_srcdir)/Include/cholmod_partition.h header.tex rule.awk footer.tex
  690. + $(getproto)
  691. +
  692. +PROTO = \
  693. + $(PROTO_M) \
  694. + $(PROTO_SIMPLE) \
  695. + $(PROTO_CORE) \
  696. + $(PROTO_CHECK) \
  697. + $(PROTO_CHOLESKY) \
  698. + $(PROTO_MODIFY) \
  699. + $(PROTO_MATRIXOPS) \
  700. + $(PROTO_SUPERNODAL) \
  701. + $(PROTO_PARTITION)
  702. +
  703. +CHOLMOD_UserGuide.pdf CHOLMOD_UserGuide.aux: $(PROTO)
  704. +.INTERMEDIATE: CHOLMOD_UserGuide.aux $(PROTO)
  705. +
  706. +.INTERMEDIATE: CHOLMOD_UserGuide.bib
  707. +CHOLMOD_UserGuide.bib: UserGuide.bib
  708. + $(LN_S) -f $< $@
  709. +
  710. +TEX = TEXINPUTS="$(srcdir):" pdflatex -interaction nonstopmode -file-line-error
  711. +BIB = BIBINPUTS="$(srcdir):" bibtex
  712. +%.pdf: %.tex %.bbl
  713. + $(TEX) $*
  714. + while grep -q "Rerun to get cross-references right" $*.log; do \
  715. + $(TEX) $*; \
  716. + done
  717. +%.bbl: %.aux %.bib
  718. + $(BIB) $*
  719. +%.aux: %.tex
  720. + $(TEX) $*
  721. +
  722. +CLEANFILES = _*.awk _*.tex *.dvi *.aux *.log *.lof *.lot *.toc *.bak *.bbl *.blg
  723. +MAINTAINERCLEANFILES = $(dist_pdf_DATA)
  724. diff --git a/GPU/Makefile.am b/GPU/Makefile.am
  725. new file mode 100644
  726. --- /dev/null
  727. +++ b/GPU/Makefile.am
  728. @@ -0,0 +1,30 @@
  729. +AM_CFLAGS = $(OPENMP_CFLAGS)
  730. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  731. +
  732. +GPUSRC = \
  733. + cholmod_gpu.c
  734. +
  735. +EXTRA_DIST = \
  736. + cholmod_gpu_kernels.c \
  737. + cholmod_gpu_kernels.cu
  738. +
  739. +noinst_HEADERS = \
  740. + t_cholmod_gpu.c
  741. +
  742. +noinst_LTLIBRARIES = \
  743. + libgpui.la \
  744. + libgpul.la \
  745. + libgpu.la
  746. +
  747. +libgpui_la_SOURCES = $(GPUSRC)
  748. +libgpui_la_LIBADD = $(CODE_COVERAGE_LIBS)
  749. +libgpui_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  750. +libgpui_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  751. +
  752. +libgpul_la_SOURCES = $(GPUSRC)
  753. +libgpul_la_LIBADD = $(CODE_COVERAGE_LIBS)
  754. +libgpul_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  755. +libgpul_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  756. +
  757. +libgpu_la_SOURCES =
  758. +libgpu_la_LIBADD = libgpui.la libgpul.la
  759. diff --git a/Include/Makefile.am b/Include/Makefile.am
  760. new file mode 100644
  761. --- /dev/null
  762. +++ b/Include/Makefile.am
  763. @@ -0,0 +1,47 @@
  764. +EXTRA_DIST = \
  765. + README.txt
  766. +
  767. +# Automatically generated headers
  768. +nodist_pkginclude_HEADERS = \
  769. + cholmod_config.h
  770. +
  771. +pkginclude_HEADERS = \
  772. + cholmod.h \
  773. + cholmod_blas.h \
  774. + cholmod_core.h \
  775. + cholmod_function.h \
  776. + cholmod_gpu.h \
  777. + cholmod_io64.h
  778. +
  779. +noinst_HEADERS = \
  780. + cholmod_complexity.h \
  781. + cholmod_gpu_kernels.h \
  782. + cholmod_internal.h \
  783. + cholmod_template.h
  784. +
  785. +if MOD_CHECK
  786. +pkginclude_HEADERS += cholmod_check.h
  787. +endif
  788. +
  789. +if MOD_CHOLESKY
  790. +pkginclude_HEADERS += cholmod_cholesky.h
  791. +endif
  792. +
  793. +if MOD_PARTITION
  794. +pkginclude_HEADERS += cholmod_camd.h
  795. +if MOD_PARTITION_METIS
  796. +pkginclude_HEADERS += cholmod_partition.h
  797. +endif
  798. +endif
  799. +
  800. +if MOD_MATRIXOPS
  801. +pkginclude_HEADERS += cholmod_matrixops.h
  802. +endif
  803. +
  804. +if MOD_MODIFY
  805. +pkginclude_HEADERS += cholmod_modify.h
  806. +endif
  807. +
  808. +if MOD_SUPERNODAL
  809. +pkginclude_HEADERS += cholmod_supernodal.h
  810. +endif
  811. diff --git a/Include/cholmod_config.h b/Include/cholmod_config.h.in
  812. rename from Include/cholmod_config.h
  813. rename to Include/cholmod_config.h.in
  814. --- a/Include/cholmod_config.h
  815. +++ b/Include/cholmod_config.h.in
  816. @@ -45,16 +45,28 @@
  817. /* Use the compiler flag, or uncomment the definition(s), if you want to use
  818. * one or more non-default installation options: */
  819. -/*
  820. -#define NCHECK
  821. -#define NCHOLESKY
  822. -#define NCAMD
  823. -#define NPARTITION
  824. +/* Define to disable the Check module */
  825. +#undef NCHECK
  826. -#define NMATRIXOPS
  827. -#define NMODIFY
  828. -#define NSUPERNODAL
  829. +/* Define to disable the Cholesky module */
  830. +#undef NCHOLESKY
  831. +
  832. +/* Define to disable the Partition module */
  833. +#undef NCAMD
  834. +
  835. +/* Define to disable METIS support in the Partition module */
  836. +#undef NPARTITION
  837. +/* Define to disable the MatrixOps module */
  838. +#undef NMATRIXOPS
  839. +
  840. +/* Define to disable the Modify module */
  841. +#undef NMODIFY
  842. +
  843. +/* Define to disable the Supernodal module */
  844. +#undef NSUPERNODAL
  845. +
  846. +/*
  847. #define NPRINT
  848. #define LONGBLAS long
  849. @@ -62,6 +74,9 @@
  850. #define NSUNPERF
  851. */
  852. +/* Define to disable GPL-licensed modules */
  853. +#undef NGPL
  854. +
  855. /* The option disables the MatrixOps, Modify, and Supernodal modules. The
  856. existence of this #define here, and its use in these 3 modules, does not
  857. affect the license itself; see CHOLMOD/Doc/License.txt for your actual
  858. diff --git a/MATLAB/Makefile.am b/MATLAB/Makefile.am
  859. new file mode 100644
  860. --- /dev/null
  861. +++ b/MATLAB/Makefile.am
  862. @@ -0,0 +1,26 @@
  863. +# Needed by Doc/Makefile.am
  864. +EXTRA_DIST = \
  865. + analyze.m \
  866. + bisect.m \
  867. + chol2.m \
  868. + cholmod2.m \
  869. + cholmod_demo.m \
  870. + cholmod_make.m \
  871. + etree2.m \
  872. + graph_demo.m \
  873. + lchol.m \
  874. + ldl_normest.m \
  875. + ldlchol.m \
  876. + ldlsolve.m \
  877. + ldlsplit.m \
  878. + ldlupdate.m \
  879. + ldlrowmod.m \
  880. + metis.m \
  881. + mread.m \
  882. + mwrite.m \
  883. + nesdis.m \
  884. + resymbol.m \
  885. + sdmult.m \
  886. + sparse2.m \
  887. + spsym.m \
  888. + symbfact2.m
  889. diff --git a/Makefile.am b/Makefile.am
  890. new file mode 100644
  891. --- /dev/null
  892. +++ b/Makefile.am
  893. @@ -0,0 +1,52 @@
  894. +ACLOCAL_AMFLAGS = -I m4
  895. +
  896. +SUBDIRS = Include Core
  897. +EXTRA_DIST = README.txt
  898. +
  899. +pkgconfig_DATA = cholmod.pc
  900. +
  901. +lib_LTLIBRARIES = libcholmod.la
  902. +
  903. +libcholmod_la_SOURCES =
  904. +libcholmod_la_LIBADD = $(top_builddir)/Core/libcore.la
  905. +libcholmod_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION)
  906. +
  907. +if MOD_CHECK
  908. +SUBDIRS += Check
  909. +libcholmod_la_LIBADD += $(top_builddir)/Check/libcheck.la
  910. +endif
  911. +
  912. +if MOD_CHOLESKY
  913. +SUBDIRS += Cholesky
  914. +libcholmod_la_LIBADD += $(top_builddir)/Cholesky/libcholesky.la
  915. +endif
  916. +
  917. +if MOD_PARTITION
  918. +SUBDIRS += Partition
  919. +libcholmod_la_LIBADD += $(top_builddir)/Partition/libpartition.la
  920. +endif
  921. +
  922. +if MOD_MATRIXOPS
  923. +SUBDIRS += MatrixOps
  924. +libcholmod_la_LIBADD += $(top_builddir)/MatrixOps/libmatrixops.la
  925. +endif
  926. +
  927. +if MOD_MODIFY
  928. +SUBDIRS += Modify
  929. +libcholmod_la_LIBADD += $(top_builddir)/Modify/libmodify.la
  930. +endif
  931. +
  932. +if MOD_SUPERNODAL
  933. +SUBDIRS += Supernodal
  934. +libcholmod_la_LIBADD += $(top_builddir)/Supernodal/libsupernodal.la
  935. +endif
  936. +
  937. +if MOD_GPU
  938. +SUBDIRS += GPU
  939. +libcholmod_la_LIBADD += $(top_builddir)/GPU/libgpu.la
  940. +endif
  941. +
  942. +SUBDIRS += . MATLAB Demo Tcov Doc
  943. +
  944. +CODE_COVERAGE_BRANCH_COVERAGE = 1
  945. +@CODE_COVERAGE_RULES@
  946. diff --git a/MatrixOps/Makefile.am b/MatrixOps/Makefile.am
  947. new file mode 100644
  948. --- /dev/null
  949. +++ b/MatrixOps/Makefile.am
  950. @@ -0,0 +1,36 @@
  951. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  952. +
  953. +EXTRA_DIST = \
  954. + gpl.txt
  955. +
  956. +MATRIXOPSSRC = \
  957. + cholmod_drop.c \
  958. + cholmod_horzcat.c \
  959. + cholmod_norm.c \
  960. + cholmod_scale.c \
  961. + cholmod_sdmult.c \
  962. + cholmod_ssmult.c \
  963. + cholmod_submatrix.c \
  964. + cholmod_symmetry.c \
  965. + cholmod_vertcat.c
  966. +
  967. +noinst_HEADERS = \
  968. + t_cholmod_sdmult.c
  969. +
  970. +noinst_LTLIBRARIES = \
  971. + libmatrixopsi.la \
  972. + libmatrixopsl.la \
  973. + libmatrixops.la
  974. +
  975. +libmatrixopsi_la_SOURCES = $(MATRIXOPSSRC)
  976. +libmatrixopsi_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  977. +libmatrixopsi_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  978. +libmatrixopsi_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  979. +
  980. +libmatrixopsl_la_SOURCES = $(MATRIXOPSSRC)
  981. +libmatrixopsl_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  982. +libmatrixopsl_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  983. +libmatrixopsl_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  984. +
  985. +libmatrixops_la_SOURCES =
  986. +libmatrixops_la_LIBADD = libmatrixopsi.la libmatrixopsl.la
  987. diff --git a/Modify/Makefile.am b/Modify/Makefile.am
  988. new file mode 100644
  989. --- /dev/null
  990. +++ b/Modify/Makefile.am
  991. @@ -0,0 +1,31 @@
  992. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  993. +
  994. +EXTRA_DIST = \
  995. + gpl.txt
  996. +
  997. +MODIFYSRC = \
  998. + cholmod_rowadd.c \
  999. + cholmod_rowdel.c \
  1000. + cholmod_updown.c
  1001. +
  1002. +noinst_HEADERS = \
  1003. + t_cholmod_updown.c \
  1004. + t_cholmod_updown_numkr.c
  1005. +
  1006. +noinst_LTLIBRARIES = \
  1007. + libmodifyi.la \
  1008. + libmodifyl.la \
  1009. + libmodify.la
  1010. +
  1011. +libmodifyi_la_SOURCES = $(MODIFYSRC)
  1012. +libmodifyi_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  1013. +libmodifyi_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  1014. +libmodifyi_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  1015. +
  1016. +libmodifyl_la_SOURCES = $(MODIFYSRC)
  1017. +libmodifyl_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  1018. +libmodifyl_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  1019. +libmodifyl_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  1020. +
  1021. +libmodify_la_SOURCES =
  1022. +libmodify_la_LIBADD = libmodifyi.la libmodifyl.la
  1023. diff --git a/Partition/Makefile.am b/Partition/Makefile.am
  1024. new file mode 100644
  1025. --- /dev/null
  1026. +++ b/Partition/Makefile.am
  1027. @@ -0,0 +1,35 @@
  1028. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(METIS_CFLAGS) $(CCOLAMD_CFLAGS) $(CAMD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS)
  1029. +
  1030. +EXTRA_DIST = \
  1031. + lesser.txt
  1032. +
  1033. +PARTITIONSRC = \
  1034. + cholmod_camd.c \
  1035. + cholmod_ccolamd.c \
  1036. + cholmod_csymamd.c
  1037. +METISSRC = \
  1038. + cholmod_metis.c \
  1039. + cholmod_nesdis.c
  1040. +
  1041. +noinst_LTLIBRARIES = \
  1042. + libpartitioni.la \
  1043. + libpartitionl.la \
  1044. + libpartition.la
  1045. +
  1046. +libpartitioni_la_SOURCES = $(PARTITIONSRC)
  1047. +libpartitioni_la_LIBADD = $(METIS_LIBS) $(CCOLAMD_LIBS) $(CAMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  1048. +libpartitioni_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  1049. +libpartitioni_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  1050. +
  1051. +libpartitionl_la_SOURCES = $(PARTITIONSRC)
  1052. +libpartitionl_la_LIBADD = $(METIS_LIBS) $(CCOLAMD_LIBS) $(CAMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm $(CODE_COVERAGE_LIBS)
  1053. +libpartitionl_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  1054. +libpartitionl_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  1055. +
  1056. +if MOD_PARTITION_METIS
  1057. +libpartitioni_la_SOURCES += $(METISSRC)
  1058. +libpartitionl_la_SOURCES += $(METISSRC)
  1059. +endif
  1060. +
  1061. +libpartition_la_SOURCES =
  1062. +libpartition_la_LIBADD = libpartitioni.la libpartitionl.la
  1063. diff --git a/Supernodal/Makefile.am b/Supernodal/Makefile.am
  1064. new file mode 100644
  1065. --- /dev/null
  1066. +++ b/Supernodal/Makefile.am
  1067. @@ -0,0 +1,37 @@
  1068. +AM_CFLAGS = $(OPENMP_CFLAGS)
  1069. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  1070. +
  1071. +EXTRA_DIST = \
  1072. + gpl.txt
  1073. +
  1074. +SUPERNODALSRC = \
  1075. + cholmod_super_numeric.c \
  1076. + cholmod_super_solve.c \
  1077. + cholmod_super_symbolic.c
  1078. +
  1079. +noinst_HEADERS = \
  1080. + t_cholmod_super_numeric.c \
  1081. + t_cholmod_super_solve.c
  1082. +
  1083. +noinst_LTLIBRARIES = \
  1084. + libsupernodali.la \
  1085. + libsupernodall.la \
  1086. + libsupernodal.la
  1087. +
  1088. +libsupernodali_la_SOURCES = $(SUPERNODALSRC)
  1089. +libsupernodali_la_LIBADD = $(LAPACK_LIBS) $(BLAS_LIBS) $(SUITESPARSECONFIG_LIBS) $(CODE_COVERAGE_LIBS)
  1090. +libsupernodali_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
  1091. +libsupernodali_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  1092. +
  1093. +libsupernodall_la_SOURCES = $(SUPERNODALSRC)
  1094. +libsupernodall_la_LIBADD = $(LAPACK_LIBS) $(BLAS_LIBS) $(SUITESPARSECONFIG_LIBS) $(CODE_COVERAGE_LIBS)
  1095. +libsupernodall_la_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) -DDLONG
  1096. +libsupernodall_la_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
  1097. +
  1098. +if !TIMING
  1099. +libsupernodali_la_CPPFLAGS += -DNTIMER
  1100. +libsupernodall_la_CPPFLAGS += -DNTIMER
  1101. +endif
  1102. +
  1103. +libsupernodal_la_SOURCES =
  1104. +libsupernodal_la_LIBADD = libsupernodali.la libsupernodall.la
  1105. diff --git a/Tcov/Makefile.am b/Tcov/Makefile.am
  1106. new file mode 100644
  1107. --- /dev/null
  1108. +++ b/Tcov/Makefile.am
  1109. @@ -0,0 +1,330 @@
  1110. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  1111. +
  1112. +EXTRA_DIST = \
  1113. + README.txt \
  1114. + gpl.txt
  1115. +
  1116. +dist_noinst_DATA = \
  1117. + comments.txt \
  1118. + Matrix/0 \
  1119. + Matrix/0_1 \
  1120. + Matrix/1_0 \
  1121. + Matrix/1e99 \
  1122. + Matrix/2.tri \
  1123. + Matrix/20lo \
  1124. + Matrix/2diag.tri \
  1125. + Matrix/2lo.tri \
  1126. + Matrix/2up.tri \
  1127. + Matrix/3_2 \
  1128. + Matrix/3b \
  1129. + Matrix/3by0.mtx \
  1130. + Matrix/3singular \
  1131. + Matrix/5by50 \
  1132. + Matrix/C9840 \
  1133. + Matrix/afiro \
  1134. + Matrix/c10 \
  1135. + Matrix/c30lo \
  1136. + Matrix/c30up \
  1137. + Matrix/c3singular \
  1138. + Matrix/c5lo \
  1139. + Matrix/c5up2 \
  1140. + Matrix/cha.mtx \
  1141. + Matrix/cpi \
  1142. + Matrix/crud1 \
  1143. + Matrix/crud2 \
  1144. + Matrix/cs.mtx \
  1145. + Matrix/csa.mtx \
  1146. + Matrix/cza \
  1147. + Matrix/cza.mtx \
  1148. + Matrix/diag \
  1149. + Matrix/ex5lo \
  1150. + Matrix/fullcha.mtx \
  1151. + Matrix/fullcrud.mtx \
  1152. + Matrix/fullcrud1.mtx \
  1153. + Matrix/fullcrud2.mtx \
  1154. + Matrix/fullcsa.mtx \
  1155. + Matrix/fullcza.mtx \
  1156. + Matrix/fullrsa.mtx \
  1157. + Matrix/fullrza.mtx \
  1158. + Matrix/galenet \
  1159. + Matrix/huge.tri \
  1160. + Matrix/ibm32 \
  1161. + Matrix/k01up \
  1162. + Matrix/one \
  1163. + Matrix/pi \
  1164. + Matrix/plskz362.mtx \
  1165. + Matrix/r5lo \
  1166. + Matrix/r5lo2 \
  1167. + Matrix/r5up \
  1168. + Matrix/r5up2 \
  1169. + Matrix/rza.mtx \
  1170. + Matrix/z10 \
  1171. + Matrix/z30lo \
  1172. + Matrix/z30up \
  1173. + Matrix/z3singular \
  1174. + Matrix/z5lo \
  1175. + Matrix/z5up \
  1176. + Matrix/z5up2 \
  1177. + Matrix/zero
  1178. +
  1179. +TEST = \
  1180. + amdtest.c \
  1181. + aug.c \
  1182. + camdtest.c \
  1183. + cctest.c \
  1184. + cm.c \
  1185. + cm.h \
  1186. + ctest.c \
  1187. + huge.c \
  1188. + lpdemo.c \
  1189. + memory.c \
  1190. + null.c \
  1191. + null2.c \
  1192. + raw_factor.c \
  1193. + solve.c \
  1194. + test_ops.c \
  1195. + unpack.c
  1196. +
  1197. +if MOD_CHECK
  1198. +if MOD_CHOLESKY
  1199. +if MOD_PARTITION
  1200. +if MOD_MATRIXOPS
  1201. +if MOD_MODIFY
  1202. +if MOD_SUPERNODAL
  1203. +if CODE_COVERAGE_ENABLED
  1204. +
  1205. +check_PROGRAMS = \
  1206. + cm \
  1207. + cl \
  1208. + cmread \
  1209. + clread
  1210. +
  1211. +cm_SOURCES = $(TEST)
  1212. +cm_LDADD = $(top_builddir)/libcholmod.la $(COLAMD_LIBS) $(AMD_LIBS) $(CCOLAMD_LIBS) $(CAMD_LIBS) $(BLAS_LIBS) $(SUITESPARSECONFIG_LIBS)
  1213. +cm_CPPFLAGS = $(AM_CPPFLAGS) $(COLAMD_CFLAGS) $(AMD_CFLAGS) $(CCOLAMD_CFLAGS) $(CAMD_CFLAGS)
  1214. +
  1215. +cl_SOURCES = $(TEST)
  1216. +cl_LDADD = $(top_builddir)/libcholmod.la $(COLAMD_LIBS) $(AMD_LIBS) $(CCOLAMD_LIBS) $(CAMD_LIBS) $(BLAS_LIBS) $(SUITESPARSECONFIG_LIBS)
  1217. +cl_CPPFLAGS = $(AM_CPPFLAGS) $(COLAMD_CFLAGS) $(AMD_CFLAGS) $(CCOLAMD_CFLAGS) $(CAMD_CFLAGS) -DDLONG
  1218. +
  1219. +cmread_SOURCES = cmread.c
  1220. +cmread_LDADD = $(top_builddir)/libcholmod.la
  1221. +
  1222. +clread_SOURCES = cmread.c
  1223. +clread_LDADD = $(top_builddir)/libcholmod.la
  1224. +clread_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  1225. +
  1226. +MATRICES = \
  1227. + $(srcdir)/Matrix/0 \
  1228. + $(srcdir)/Matrix/0_1 \
  1229. + $(srcdir)/Matrix/1_0 \
  1230. + $(srcdir)/Matrix/1e99 \
  1231. + $(srcdir)/Matrix/2.tri \
  1232. + $(srcdir)/Matrix/20lo \
  1233. + $(srcdir)/Matrix/2diag.tri \
  1234. + $(srcdir)/Matrix/2lo.tri \
  1235. + $(srcdir)/Matrix/2up.tri \
  1236. + $(srcdir)/Matrix/3b \
  1237. + $(srcdir)/Matrix/3by0.mtx \
  1238. + $(srcdir)/Matrix/3singular \
  1239. + $(srcdir)/Matrix/5by50 \
  1240. + $(srcdir)/Matrix/C9840 \
  1241. + $(srcdir)/Matrix/afiro \
  1242. + $(srcdir)/Matrix/c10 \
  1243. + $(srcdir)/Matrix/c30lo \
  1244. + $(srcdir)/Matrix/c30up \
  1245. + $(srcdir)/Matrix/c3singular \
  1246. + $(srcdir)/Matrix/c5lo \
  1247. + $(srcdir)/Matrix/c5up2 \
  1248. + $(srcdir)/Matrix/cha.mtx \
  1249. + $(srcdir)/Matrix/cpi \
  1250. + $(srcdir)/Matrix/crud1 \
  1251. + $(srcdir)/Matrix/crud2 \
  1252. + $(srcdir)/Matrix/cs.mtx \
  1253. + $(srcdir)/Matrix/csa.mtx \
  1254. + $(srcdir)/Matrix/cza \
  1255. + $(srcdir)/Matrix/cza.mtx \
  1256. + $(srcdir)/Matrix/diag \
  1257. + $(srcdir)/Matrix/ex5lo \
  1258. + $(srcdir)/Matrix/fullcha.mtx \
  1259. + $(srcdir)/Matrix/fullcrud.mtx \
  1260. + $(srcdir)/Matrix/fullcrud1.mtx \
  1261. + $(srcdir)/Matrix/fullcrud2.mtx \
  1262. + $(srcdir)/Matrix/fullcsa.mtx \
  1263. + $(srcdir)/Matrix/fullcza.mtx \
  1264. + $(srcdir)/Matrix/fullrsa.mtx \
  1265. + $(srcdir)/Matrix/fullrza.mtx \
  1266. + $(srcdir)/Matrix/galenet \
  1267. + $(srcdir)/Matrix/huge.tri \
  1268. + $(srcdir)/Matrix/ibm32 \
  1269. + $(srcdir)/Matrix/k01up \
  1270. + $(srcdir)/Matrix/one \
  1271. + $(srcdir)/Matrix/pi \
  1272. + $(srcdir)/Matrix/plskz362.mtx \
  1273. + $(srcdir)/Matrix/r5lo \
  1274. + $(srcdir)/Matrix/r5lo2 \
  1275. + $(srcdir)/Matrix/r5up \
  1276. + $(srcdir)/Matrix/r5up2 \
  1277. + $(srcdir)/Matrix/rza.mtx \
  1278. + $(srcdir)/Matrix/z10 \
  1279. + $(srcdir)/Matrix/z30lo \
  1280. + $(srcdir)/Matrix/z30up \
  1281. + $(srcdir)/Matrix/z3singular \
  1282. + $(srcdir)/Matrix/z5lo \
  1283. + $(srcdir)/Matrix/z5up \
  1284. + $(srcdir)/Matrix/z5up2 \
  1285. + $(srcdir)/Matrix/zero \
  1286. + $(top_srcdir)/Demo/Matrix/empty.tri \
  1287. + $(top_srcdir)/Demo/Matrix/mangle5.tri \
  1288. + $(top_srcdir)/Demo/Matrix/mangle6.tri \
  1289. + $(top_srcdir)/Demo/Matrix/mangle7.tri \
  1290. + $(top_srcdir)/Demo/Matrix/mangle8.tri \
  1291. + $(top_srcdir)/Demo/Matrix/one.tri
  1292. +
  1293. +check-local: $(check_PROGRAMS) $(MATRICES)
  1294. + ./cmread no_such_file > no_such_file.out
  1295. + ./cmread $(srcdir)/Matrix/crud1 > crud1.out
  1296. + ./cmread $(srcdir)/Matrix/crud2 > crud2.out
  1297. + ./cmread $(srcdir)/Matrix/fullcrud.mtx > fullcrud.out
  1298. + ./cmread $(srcdir)/Matrix/fullcrud1.mtx > fullcrud1.out
  1299. + ./cmread $(srcdir)/Matrix/fullcrud2.mtx > fullcrud2.out
  1300. + ./cmread $(srcdir)/Matrix/3by0.mtx > 3by0.out
  1301. + ./cmread $(srcdir)/Matrix/fullrza.mtx > fullrza.out
  1302. + ./cmread $(srcdir)/Matrix/fullrsa.mtx > fullrsa.out
  1303. + ./cmread $(srcdir)/Matrix/fullcsa.mtx > fullcsa.out
  1304. + ./cmread $(srcdir)/Matrix/fullcza.mtx > fullcza.out
  1305. + ./cmread $(srcdir)/Matrix/fullcha.mtx > fullcha.out
  1306. + ./cmread $(srcdir)/Matrix/cha.mtx > cha.out
  1307. + ./cmread $(srcdir)/Matrix/cza.mtx > cza.out
  1308. + ./cmread $(srcdir)/Matrix/csa.mtx > csa.out
  1309. + ./cmread $(srcdir)/Matrix/one > one.out
  1310. + ./cmread $(srcdir)/Matrix/rza.mtx > rza.out
  1311. + ./cmread $(top_srcdir)/Demo/Matrix/mangle5.tri > mangle5.out
  1312. + ./cmread $(top_srcdir)/Demo/Matrix/mangle6.tri > mangle6.out
  1313. + ./cmread $(top_srcdir)/Demo/Matrix/mangle7.tri > mangle6.out
  1314. + ./cmread $(top_srcdir)/Demo/Matrix/mangle8.tri > mangle8.out
  1315. + ./cmread $(top_srcdir)/Demo/Matrix/empty.tri > empty.out
  1316. + ./cmread $(top_srcdir)/Demo/Matrix/one.tri > one.out
  1317. + ./cmread $(srcdir)/Matrix/plskz362.mtx > plskz363.out
  1318. + ./cmread $(srcdir)/Matrix/2diag.tri > 2diag.out
  1319. + ./cmread $(srcdir)/Matrix/r5lo > r5lo.out
  1320. + ./cmread $(srcdir)/Matrix/r5lo2 > r5lo2.out
  1321. + ./cmread $(srcdir)/Matrix/cs.mtx > cs.out
  1322. + ./cmread $(srcdir)/Matrix/2lo.tri > 2lo.out
  1323. + ./cmread $(srcdir)/Matrix/2.tri > 2.out
  1324. + ./cmread $(srcdir)/Matrix/2up.tri > 2up.out
  1325. + ./cmread $(srcdir)/Matrix/huge.tri > huge.out
  1326. + ./cmread $(srcdir)/Matrix/1e99 > 1e99.out
  1327. + ./clread no_such_file > l_no_such_file.out
  1328. + ./clread $(srcdir)/Matrix/crud1 > l_crud1.out
  1329. + ./clread $(srcdir)/Matrix/crud2 > l_crud2.out
  1330. + ./clread $(srcdir)/Matrix/fullcrud.mtx > l_fullcrud.out
  1331. + ./clread $(srcdir)/Matrix/fullcrud1.mtx > l_fullcrud1.out
  1332. + ./clread $(srcdir)/Matrix/fullcrud2.mtx > l_fullcrud2.out
  1333. + ./clread $(srcdir)/Matrix/3by0.mtx > l_3by0.out
  1334. + ./clread $(srcdir)/Matrix/fullrza.mtx > l_fullrza.out
  1335. + ./clread $(srcdir)/Matrix/fullrsa.mtx > l_fullrsa.out
  1336. + ./clread $(srcdir)/Matrix/fullcsa.mtx > l_fullcsa.out
  1337. + ./clread $(srcdir)/Matrix/fullcza.mtx > l_fullcza.out
  1338. + ./clread $(srcdir)/Matrix/fullcha.mtx > l_fullcha.out
  1339. + ./clread $(srcdir)/Matrix/cha.mtx > l_cha.out
  1340. + ./clread $(srcdir)/Matrix/cza.mtx > l_cza.out
  1341. + ./clread $(srcdir)/Matrix/csa.mtx > l_csa.out
  1342. + ./clread $(srcdir)/Matrix/one > l_one.out
  1343. + ./clread $(srcdir)/Matrix/rza.mtx > l_rza.out
  1344. + ./clread $(top_srcdir)/Demo/Matrix/mangle5.tri > l_mangle5.out
  1345. + ./clread $(top_srcdir)/Demo/Matrix/mangle6.tri > l_mangle6.out
  1346. + ./clread $(top_srcdir)/Demo/Matrix/mangle7.tri > l_mangle6.out
  1347. + ./clread $(top_srcdir)/Demo/Matrix/mangle8.tri > l_mangle8.out
  1348. + ./clread $(top_srcdir)/Demo/Matrix/empty.tri > l_empty.out
  1349. + ./clread $(top_srcdir)/Demo/Matrix/one.tri > l_one.out
  1350. + ./clread $(srcdir)/Matrix/plskz362.mtx > l_plskz363.out
  1351. + ./clread $(srcdir)/Matrix/2diag.tri > l_2diag.out
  1352. + ./clread $(srcdir)/Matrix/r5lo > l_r5lo.out
  1353. + ./clread $(srcdir)/Matrix/r5lo2 > l_r5lo2.out
  1354. + ./clread $(srcdir)/Matrix/cs.mtx > l_cs.out
  1355. + ./clread $(srcdir)/Matrix/2lo.tri > l_l_2lo.out
  1356. + ./clread $(srcdir)/Matrix/2.tri > l_2.out
  1357. + ./clread $(srcdir)/Matrix/2up.tri > l_2up.out
  1358. + ./clread $(srcdir)/Matrix/huge.tri > l_huge.out
  1359. + ./clread $(srcdir)/Matrix/1e99 > l_1e99.out
  1360. + ./cm < $(srcdir)/Matrix/galenet > galenet.out
  1361. + ./cl < $(srcdir)/Matrix/galenet > l_galenet.out
  1362. + ./cm < $(srcdir)/Matrix/5by50 > 5by50.out
  1363. + ./cl < $(srcdir)/Matrix/5by50 > l_5by50.out
  1364. + ./cm < $(srcdir)/Matrix/r5lo > r5lo.out
  1365. + ./cl < $(srcdir)/Matrix/r5lo > l_r5lo.out
  1366. + ./cm < $(srcdir)/Matrix/r5up > r5up.out
  1367. + ./cl < $(srcdir)/Matrix/r5up > l_r5up.out
  1368. + ./cm < $(srcdir)/Matrix/r5up2 > r5up2.out
  1369. + ./cl < $(srcdir)/Matrix/r5up2 > l_r5up2.out
  1370. + ./cm < $(srcdir)/Matrix/c5up2 > c5up2.out
  1371. + ./cl < $(srcdir)/Matrix/c5up2 > l_c5up2.out
  1372. + ./cm < $(srcdir)/Matrix/z5up2 > z5up2.out
  1373. + ./cl < $(srcdir)/Matrix/z5up2 > l_z5up2.out
  1374. + ./cm -m < $(srcdir)/Matrix/z5lo > z5lo.out
  1375. + ./cl -m < $(srcdir)/Matrix/z5lo > l_z5lo.out
  1376. + ./cm < $(srcdir)/Matrix/ibm32 > ibm.out
  1377. + ./cl < $(srcdir)/Matrix/ibm32 > l_ibm.out
  1378. + ./cm -m < $(srcdir)/Matrix/c5lo > c5lo.out
  1379. + ./cl -m < $(srcdir)/Matrix/c5lo > l_c5lo.out
  1380. + ./cm -m < $(srcdir)/Matrix/z10 > z10.out
  1381. + ./cl -m < $(srcdir)/Matrix/z10 > l_z10.out
  1382. + ./cm -m < $(srcdir)/Matrix/z5up > z5up.out
  1383. + ./cl -m < $(srcdir)/Matrix/z5up > l_z5up.out
  1384. + ./cm -s < $(srcdir)/Matrix/3singular > 3singular.out
  1385. + ./cl -s < $(srcdir)/Matrix/3singular > l_3singular.out
  1386. + ./cm -s < $(srcdir)/Matrix/z3singular > z3singular.out
  1387. + ./cl -s < $(srcdir)/Matrix/z3singular > l_z3singular.out
  1388. + ./cm -s < $(srcdir)/Matrix/c3singular > c3singular.out
  1389. + ./cl -s < $(srcdir)/Matrix/c3singular > l_c3singular.out
  1390. + ./cm -m < $(srcdir)/Matrix/0 > 0.out
  1391. + ./cl -m < $(srcdir)/Matrix/0 > l_0.out
  1392. + ./cm -m < $(srcdir)/Matrix/afiro > afiro.out
  1393. + ./cl -m < $(srcdir)/Matrix/afiro > l_afiro.out
  1394. + ./cm -m < $(srcdir)/Matrix/k01up > k01up.out
  1395. + ./cl -m < $(srcdir)/Matrix/k01up > l_k01up.out
  1396. + ./cm < $(srcdir)/Matrix/diag > diag.out
  1397. + ./cl < $(srcdir)/Matrix/diag > l_diag.out
  1398. + ./cm -m < $(srcdir)/Matrix/ex5lo > ex5lo.out
  1399. + ./cl -m < $(srcdir)/Matrix/ex5lo > l_ex5lo.out
  1400. + ./cm < $(srcdir)/Matrix/20lo > 20lo.out
  1401. + ./cl < $(srcdir)/Matrix/20lo > l_20lo.out
  1402. + ./cm < $(srcdir)/Matrix/z30lo > z30lo.out
  1403. + ./cl < $(srcdir)/Matrix/z30lo > l_z30lo.out
  1404. + ./cm -m < $(srcdir)/Matrix/z30up > z30up.out
  1405. + ./cl -m < $(srcdir)/Matrix/z30up > l_z30up.out
  1406. + ./cm < $(srcdir)/Matrix/c10 > c10.out
  1407. + ./cl < $(srcdir)/Matrix/c10 > l_c10.out
  1408. + ./cm < $(srcdir)/Matrix/c30lo > c30lo.out
  1409. + ./cl < $(srcdir)/Matrix/c30lo > l_c30lo.out
  1410. + ./cm < $(srcdir)/Matrix/C9840 > C9840.out
  1411. + ./cl < $(srcdir)/Matrix/C9840 > l_C9840.out
  1412. + ./cm -m < $(srcdir)/Matrix/c30up > c30up.out
  1413. + ./cl -m < $(srcdir)/Matrix/c30up > l_c30up.out
  1414. + ./cm < $(srcdir)/Matrix/pi > pi.out
  1415. + ./cl < $(srcdir)/Matrix/pi > l_pi.out
  1416. + ./cm < $(srcdir)/Matrix/cpi > cpi.out
  1417. + ./cl < $(srcdir)/Matrix/cpi > l_cpi.out
  1418. + ./cm < $(srcdir)/Matrix/1_0 > 1_0.out
  1419. + ./cl < $(srcdir)/Matrix/1_0 > l_1_0.out
  1420. + ./cm -s < $(srcdir)/Matrix/3b > 3b.out
  1421. + ./cl -s < $(srcdir)/Matrix/3b > l_3b.out
  1422. + ./cm -s < $(srcdir)/Matrix/cza > cza2.out
  1423. + ./cl -s < $(srcdir)/Matrix/cza > l_cza2.out
  1424. + ./cm < $(srcdir)/Matrix/0_1 > 0_1.out
  1425. + ./cl < $(srcdir)/Matrix/0_1 > l_0_1.out
  1426. + ./cm -n < $(srcdir)/Matrix/galenet > galenet_nan.out
  1427. + ./cl -n < $(srcdir)/Matrix/galenet > l_galenet_nan.out
  1428. + ./cm < $(srcdir)/Matrix/zero > zero.out
  1429. + ./cl < $(srcdir)/Matrix/zero > zero.out
  1430. +
  1431. +endif
  1432. +endif
  1433. +endif
  1434. +endif
  1435. +endif
  1436. +endif
  1437. +endif
  1438. +
  1439. +CLEANFILES = temp*.mtx *.out
  1440. diff --git a/cholmod.pc.in b/cholmod.pc.in
  1441. new file mode 100644
  1442. --- /dev/null
  1443. +++ b/cholmod.pc.in
  1444. @@ -0,0 +1,13 @@
  1445. +prefix=@prefix@
  1446. +exec_prefix=@exec_prefix@
  1447. +libdir=@libdir@
  1448. +includedir=@includedir@
  1449. +
  1450. +Name: @PACKAGE_NAME@
  1451. +Description: Sparse Cholesky factorization
  1452. +Version: @PACKAGE_VERSION@
  1453. +URL: @PACKAGE_URL@
  1454. +Requires.private: @CHOLMOD_REQUIRES@
  1455. +Libs: -L${libdir} -lcholmod
  1456. +Libs.private: @LAPACK_LIBS@ @BLAS_LIBS@ -lm
  1457. +Cflags: -I${includedir}/cholmod
  1458. diff --git a/configure.ac b/configure.ac
  1459. new file mode 100644
  1460. --- /dev/null
  1461. +++ b/configure.ac
  1462. @@ -0,0 +1,221 @@
  1463. +# -*- Autoconf -*-
  1464. +# Process this file with autoconf to produce a configure script.
  1465. +
  1466. +AC_PREREQ([2.69])
  1467. +AC_INIT([CHOLMOD],[3.0.14],[https://github.com/DrTimothyAldenDavis/SuiteSparse],[cholmod],[http://www.suitesparse.com/])
  1468. +AC_CONFIG_SRCDIR([Core/cholmod_common.c])
  1469. +AC_CONFIG_AUX_DIR([build-aux])
  1470. +AC_CONFIG_MACRO_DIR([m4])
  1471. +AC_CONFIG_HEADERS([config.h Include/cholmod_config.h])
  1472. +AM_INIT_AUTOMAKE([foreign])
  1473. +AM_SILENT_RULES([yes])
  1474. +LT_INIT([disable-static])
  1475. +
  1476. +# Checks for programs.
  1477. +PKG_PROG_PKG_CONFIG
  1478. +AC_PROG_INSTALL
  1479. +AC_PROG_CC
  1480. +AC_PROG_F77
  1481. +AC_PROG_AWK
  1482. +AC_OPENMP
  1483. +AX_CODE_COVERAGE
  1484. +
  1485. +AC_ARG_ENABLE([mod-check],
  1486. + [AS_HELP_STRING(
  1487. + [--disable-mod-check],
  1488. + [do not build the Check module])],
  1489. + [],
  1490. + [AS_VAR_SET([enable_mod_check], [yes])])
  1491. +
  1492. +AC_ARG_ENABLE([mod-cholesky],
  1493. + [AS_HELP_STRING(
  1494. + [--disable-mod-cholesky],
  1495. + [do not build the Cholesky module])],
  1496. + [],
  1497. + [AS_VAR_SET([enable_mod_cholesky], [yes])])
  1498. +
  1499. +AC_ARG_ENABLE([mod-partition],
  1500. + [AS_HELP_STRING(
  1501. + [--disable-mod-partition],
  1502. + [do not build the Partition module])],
  1503. + [],
  1504. + [AS_VAR_SET([enable_mod_partition], [yes])])
  1505. +
  1506. +AC_ARG_ENABLE([mod-matrixops],
  1507. + [AS_HELP_STRING(
  1508. + [--disable-mod-matrixops],
  1509. + [do not build the MatrixOps module])],
  1510. + [],
  1511. + [AS_VAR_SET([enable_mod_matrixops], [yes])])
  1512. +
  1513. +AC_ARG_ENABLE([mod-modify],
  1514. + [AS_HELP_STRING(
  1515. + [--disable-mod-modify],
  1516. + [do not build the Modify module])],
  1517. + [],
  1518. + [AS_VAR_SET([enable_mod_modify], [yes])])
  1519. +
  1520. +AC_ARG_ENABLE([mod-supernodal],
  1521. + [AS_HELP_STRING(
  1522. + [--disable-mod-supernodal],
  1523. + [do not build the Supernodal module])],
  1524. + [],
  1525. + [AS_VAR_SET([enable_mod_supernodal], [yes])])
  1526. +
  1527. +AC_ARG_ENABLE([gpl-modules],
  1528. + [AS_HELP_STRING(
  1529. + [--disable-gpl-modules],
  1530. + [do not build GPL-licensed modules])],
  1531. + [],
  1532. + [AS_VAR_SET([enable_gpl_modules], [yes])])
  1533. +
  1534. +AC_ARG_ENABLE([timing],
  1535. + [AS_HELP_STRING(
  1536. + [--disable-timing],
  1537. + [do not use timing routines])],
  1538. + [],
  1539. + [AS_VAR_SET([enable_timing], [yes])])
  1540. +
  1541. +AS_VAR_SET([LIBS_SAVED], [$LIBS])
  1542. +
  1543. +# Checks for libraries.
  1544. +AC_CHECK_LIB([m], [sqrt])
  1545. +
  1546. +PKG_CHECK_MODULES([SUITESPARSECONFIG], [suitesparseconfig])
  1547. +AS_VAR_SET([CHOLMOD_REQUIRES], ["suitesparseconfig"])
  1548. +
  1549. +AS_IF([test "x$enable_gpl_modules" != "xyes"], [
  1550. + AC_DEFINE([NGPL], [], [Define to disable GPL-licensed modules])
  1551. + AS_VAR_SET([enable_mod_matrixops], [no])
  1552. + AS_VAR_SET([enable_mod_modify], [no])
  1553. + AS_VAR_SET([enable_mod_supernodal], [no])
  1554. +])
  1555. +
  1556. +AS_IF([test "x$enable_mod_check" != "xyes"], [
  1557. + AC_DEFINE([NCHECK], [], [Define to disable the Check module])
  1558. +])
  1559. +
  1560. +AS_IF([test "x$enable_mod_cholesky" != "xyes"], [
  1561. + AC_DEFINE([NCHOLESKY], [], [Define to disable the Cholesky module])
  1562. +], [
  1563. + PKG_CHECK_MODULES([AMD], [amd],
  1564. + [AS_VAR_APPEND([CHOLMOD_REQUIRES], [" amd"])],
  1565. + [AC_MSG_ERROR([$AMD_PKG_ERRORS (required by mod-cholesky)])])
  1566. +
  1567. + PKG_CHECK_MODULES([COLAMD], [colamd],
  1568. + [AS_VAR_APPEND([CHOLMOD_REQUIRES], [" colamd"])],
  1569. + [AC_MSG_ERROR([$COLAMD_PKG_ERRORS (required by mod-cholesky)])])
  1570. +])
  1571. +
  1572. +AS_IF([test "x$enable_mod_partition" != "xyes"], [
  1573. + AC_DEFINE([NCAMD], [], [Define to disable the Partition module])
  1574. +], [
  1575. + PKG_CHECK_MODULES([CAMD], [camd],
  1576. + [AS_VAR_APPEND([CHOLMOD_REQUIRES], [" camd"])],
  1577. + [AC_MSG_ERROR([$CAMD_PKG_ERRORS (required by mod-partition)])])
  1578. +
  1579. + PKG_CHECK_MODULES([CCOLAMD], [ccolamd],
  1580. + [AS_VAR_APPEND([CHOLMOD_REQUIRES], [" ccolamd"])],
  1581. + [AC_MSG_ERROR([$CCOLAMD_PKG_ERRORS (required by mod-partition)])])
  1582. +
  1583. + PKG_CHECK_MODULES([METIS], [metis >= 5.1.0],
  1584. + [AS_VAR_SET([have_metis], [yes])
  1585. + AS_VAR_APPEND([CHOLMOD_REQUIRES], [" metis >= 5.1.0"])],
  1586. + [AS_VAR_SET([have_metis], [no])
  1587. + AC_MSG_WARN([$METIS_PKG_ERRORS (used by mod-partition), disabling some functionality])])
  1588. +])
  1589. +
  1590. +AS_IF([test "x$have_metis" != "xyes"], [
  1591. + AC_DEFINE([NPARTITION], [], [Define to disable METIS support in the Partition module])
  1592. +])
  1593. +
  1594. +AS_IF([test "x$enable_mod_matrixops" != "xyes"], [
  1595. + AC_DEFINE([NMATRIXOPS], [], [Define to disable the MatrixOps module])
  1596. +])
  1597. +
  1598. +AS_IF([test "x$enable_mod_modify" != "xyes"], [
  1599. + AC_DEFINE([NMODIFY], [], [Define to disable the Modify module])
  1600. +])
  1601. +
  1602. +AS_IF([test "x$enable_mod_supernodal" != "xyes"], [
  1603. + AC_DEFINE([NSUPERNODAL], [], [Define to disable the Supernodal module])
  1604. +], [
  1605. + AX_BLAS(
  1606. + [],
  1607. + [AC_MSG_ERROR([cannot find BLAS (required by mod-supernodal)])])
  1608. +
  1609. + AX_LAPACK(
  1610. + [],
  1611. + [AC_MSG_ERROR([cannot find LAPACK (required by mod-supernodal)])])
  1612. +])
  1613. +
  1614. +# Checks for header files.
  1615. +AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h])
  1616. +
  1617. +# Checks for typedefs, structures, and compiler characteristics.
  1618. +AC_TYPE_SIZE_T
  1619. +
  1620. +# Checks for library functions.
  1621. +AC_FUNC_MALLOC
  1622. +AC_CHECK_FUNCS([sqrt])
  1623. +
  1624. +AS_VAR_SET([LIBS], [$LIBS_SAVED])
  1625. +
  1626. +AC_MSG_CHECKING([whether to build mod-check])
  1627. +AC_MSG_RESULT([$enable_mod_check])
  1628. +AM_CONDITIONAL([MOD_CHECK], [test "x$enable_mod_check" = "xyes"])
  1629. +
  1630. +AC_MSG_CHECKING([whether to build mod-cholesky])
  1631. +AC_MSG_RESULT([$enable_mod_cholesky])
  1632. +AM_CONDITIONAL([MOD_CHOLESKY], [test "x$enable_mod_cholesky" = "xyes"])
  1633. +
  1634. +AC_MSG_CHECKING([whether to build mod-partition])
  1635. +AC_MSG_RESULT([$enable_mod_partition])
  1636. +AM_CONDITIONAL([MOD_PARTITION], [test "x$enable_mod_partition" = "xyes"])
  1637. +
  1638. +AC_MSG_CHECKING([whether to build mod-partition with METIS])
  1639. +AC_MSG_RESULT([$have_metis])
  1640. +AM_CONDITIONAL([MOD_PARTITION_METIS], [test "x$have_metis" = "xyes"])
  1641. +
  1642. +AC_MSG_CHECKING([whether to build mod-matrixops])
  1643. +AC_MSG_RESULT([$enable_mod_matrixops])
  1644. +AM_CONDITIONAL([MOD_MATRIXOPS], [test "x$enable_mod_matrixops" = "xyes"])
  1645. +
  1646. +AC_MSG_CHECKING([whether to build mod-modify])
  1647. +AC_MSG_RESULT([$enable_mod_modify])
  1648. +AM_CONDITIONAL([MOD_MODIFY], [test "x$enable_mod_modify" = "xyes"])
  1649. +
  1650. +AC_MSG_CHECKING([whether to build mod-supernodal])
  1651. +AC_MSG_RESULT([$enable_mod_supernodal])
  1652. +AM_CONDITIONAL([MOD_SUPERNODAL], [test "x$enable_mod_supernodal" = "xyes"])
  1653. +
  1654. +AC_MSG_CHECKING([whether to build mod-gpu])
  1655. +AC_MSG_RESULT([no])
  1656. +AM_CONDITIONAL([MOD_GPU], [false])
  1657. +
  1658. +AC_MSG_CHECKING([whether to use timing routines])
  1659. +AC_MSG_RESULT([$enable_timing])
  1660. +AM_CONDITIONAL([TIMING], [test "x$enable_timing" = "xyes"])
  1661. +
  1662. +AC_SUBST([CHOLMOD_REQUIRES])
  1663. +
  1664. +m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_SUBST([pkgconfigdir], [${libdir}/pkgconfig])])
  1665. +AC_CONFIG_FILES([
  1666. + cholmod.pc
  1667. + Makefile
  1668. + Check/Makefile
  1669. + Cholesky/Makefile
  1670. + Core/Makefile
  1671. + Demo/Makefile
  1672. + Doc/Makefile
  1673. + GPU/Makefile
  1674. + Include/Makefile
  1675. + MATLAB/Makefile
  1676. + MatrixOps/Makefile
  1677. + Modify/Makefile
  1678. + Partition/Makefile
  1679. + Supernodal/Makefile
  1680. + Tcov/Makefile
  1681. +])
  1682. +AC_CONFIG_LINKS([Tcov/comments.txt:Tcov/comments.txt])
  1683. +AC_OUTPUT
  1684. diff --git a/m4/ax_blas.m4 b/m4/ax_blas.m4
  1685. new file mode 100644
  1686. --- /dev/null
  1687. +++ b/m4/ax_blas.m4
  1688. @@ -0,0 +1,241 @@
  1689. +# ===========================================================================
  1690. +# https://www.gnu.org/software/autoconf-archive/ax_blas.html
  1691. +# ===========================================================================
  1692. +#
  1693. +# SYNOPSIS
  1694. +#
  1695. +# AX_BLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
  1696. +#
  1697. +# DESCRIPTION
  1698. +#
  1699. +# This macro looks for a library that implements the BLAS linear-algebra
  1700. +# interface (see http://www.netlib.org/blas/). On success, it sets the
  1701. +# BLAS_LIBS output variable to hold the requisite library linkages.
  1702. +#
  1703. +# To link with BLAS, you should link with:
  1704. +#
  1705. +# $BLAS_LIBS $LIBS $FLIBS
  1706. +#
  1707. +# in that order. FLIBS is the output variable of the
  1708. +# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by AX_BLAS), and is
  1709. +# sometimes necessary in order to link with F77 libraries. Users will also
  1710. +# need to use AC_F77_DUMMY_MAIN (see the autoconf manual), for the same
  1711. +# reason.
  1712. +#
  1713. +# Many libraries are searched for, from ATLAS to CXML to ESSL. The user
  1714. +# may also use --with-blas=<lib> in order to use some specific BLAS
  1715. +# library <lib>. In order to link successfully, however, be aware that you
  1716. +# will probably need to use the same Fortran compiler (which can be set
  1717. +# via the F77 env. var.) as was used to compile the BLAS library.
  1718. +#
  1719. +# ACTION-IF-FOUND is a list of shell commands to run if a BLAS library is
  1720. +# found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is
  1721. +# not found. If ACTION-IF-FOUND is not specified, the default action will
  1722. +# define HAVE_BLAS.
  1723. +#
  1724. +# LICENSE
  1725. +#
  1726. +# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
  1727. +# Copyright (c) 2019 Geoffrey M. Oxberry <goxberry@gmail.com>
  1728. +#
  1729. +# This program is free software: you can redistribute it and/or modify it
  1730. +# under the terms of the GNU General Public License as published by the
  1731. +# Free Software Foundation, either version 3 of the License, or (at your
  1732. +# option) any later version.
  1733. +#
  1734. +# This program is distributed in the hope that it will be useful, but
  1735. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  1736. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  1737. +# Public License for more details.
  1738. +#
  1739. +# You should have received a copy of the GNU General Public License along
  1740. +# with this program. If not, see <https://www.gnu.org/licenses/>.
  1741. +#
  1742. +# As a special exception, the respective Autoconf Macro's copyright owner
  1743. +# gives unlimited permission to copy, distribute and modify the configure
  1744. +# scripts that are the output of Autoconf when processing the Macro. You
  1745. +# need not follow the terms of the GNU General Public License when using
  1746. +# or distributing such scripts, even though portions of the text of the
  1747. +# Macro appear in them. The GNU General Public License (GPL) does govern
  1748. +# all other use of the material that constitutes the Autoconf Macro.
  1749. +#
  1750. +# This special exception to the GPL applies to versions of the Autoconf
  1751. +# Macro released by the Autoconf Archive. When you make and distribute a
  1752. +# modified version of the Autoconf Macro, you may extend this special
  1753. +# exception to the GPL to apply to your modified version as well.
  1754. +
  1755. +#serial 17
  1756. +
  1757. +AU_ALIAS([ACX_BLAS], [AX_BLAS])
  1758. +AC_DEFUN([AX_BLAS], [
  1759. +AC_PREREQ([2.55])
  1760. +AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
  1761. +AC_REQUIRE([AC_CANONICAL_HOST])
  1762. +ax_blas_ok=no
  1763. +
  1764. +AC_ARG_WITH(blas,
  1765. + [AS_HELP_STRING([--with-blas=<lib>], [use BLAS library <lib>])])
  1766. +case $with_blas in
  1767. + yes | "") ;;
  1768. + no) ax_blas_ok=disable ;;
  1769. + -* | */* | *.a | *.so | *.so.* | *.dylib | *.dylib.* | *.o)
  1770. + BLAS_LIBS="$with_blas"
  1771. + ;;
  1772. + *) BLAS_LIBS="-l$with_blas" ;;
  1773. +esac
  1774. +
  1775. +# Get fortran linker names of BLAS functions to check for.
  1776. +AC_F77_FUNC(sgemm)
  1777. +AC_F77_FUNC(dgemm)
  1778. +
  1779. +ax_blas_save_LIBS="$LIBS"
  1780. +LIBS="$LIBS $FLIBS"
  1781. +
  1782. +# First, check BLAS_LIBS environment variable
  1783. +if test $ax_blas_ok = no; then
  1784. +if test "x$BLAS_LIBS" != x; then
  1785. + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
  1786. + AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS])
  1787. + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes], [BLAS_LIBS=""])
  1788. + AC_MSG_RESULT($ax_blas_ok)
  1789. + LIBS="$save_LIBS"
  1790. +fi
  1791. +fi
  1792. +
  1793. +# BLAS linked to by default? (happens on some supercomputers)
  1794. +if test $ax_blas_ok = no; then
  1795. + save_LIBS="$LIBS"; LIBS="$LIBS"
  1796. + AC_MSG_CHECKING([if $sgemm is being linked in already])
  1797. + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes])
  1798. + AC_MSG_RESULT($ax_blas_ok)
  1799. + LIBS="$save_LIBS"
  1800. +fi
  1801. +
  1802. +# BLAS in OpenBLAS library? (http://xianyi.github.com/OpenBLAS/)
  1803. +if test $ax_blas_ok = no; then
  1804. + AC_CHECK_LIB(openblas, $sgemm, [ax_blas_ok=yes
  1805. + BLAS_LIBS="-lopenblas"])
  1806. +fi
  1807. +
  1808. +# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
  1809. +if test $ax_blas_ok = no; then
  1810. + AC_CHECK_LIB(atlas, ATL_xerbla,
  1811. + [AC_CHECK_LIB(f77blas, $sgemm,
  1812. + [AC_CHECK_LIB(cblas, cblas_dgemm,
  1813. + [ax_blas_ok=yes
  1814. + BLAS_LIBS="-lcblas -lf77blas -latlas"],
  1815. + [], [-lf77blas -latlas])],
  1816. + [], [-latlas])])
  1817. +fi
  1818. +
  1819. +# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
  1820. +if test $ax_blas_ok = no; then
  1821. + AC_CHECK_LIB(blas, $sgemm,
  1822. + [AC_CHECK_LIB(dgemm, $dgemm,
  1823. + [AC_CHECK_LIB(sgemm, $sgemm,
  1824. + [ax_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"],
  1825. + [], [-lblas])],
  1826. + [], [-lblas])])
  1827. +fi
  1828. +
  1829. +# BLAS in Intel MKL library?
  1830. +if test $ax_blas_ok = no; then
  1831. + # MKL for gfortran
  1832. + if test x"$ac_cv_fc_compiler_gnu" = xyes; then
  1833. + # 64 bit
  1834. + if test $host_cpu = x86_64; then
  1835. + AC_CHECK_LIB(mkl_gf_lp64, $sgemm,
  1836. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread"],,
  1837. + [-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread])
  1838. + # 32 bit
  1839. + elif test $host_cpu = i686; then
  1840. + AC_CHECK_LIB(mkl_gf, $sgemm,
  1841. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf -lmkl_sequential -lmkl_core -lpthread"],,
  1842. + [-lmkl_gf -lmkl_sequential -lmkl_core -lpthread])
  1843. + fi
  1844. + # MKL for other compilers (Intel, PGI, ...?)
  1845. + else
  1846. + # 64-bit
  1847. + if test $host_cpu = x86_64; then
  1848. + AC_CHECK_LIB(mkl_intel_lp64, $sgemm,
  1849. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread"],,
  1850. + [-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread])
  1851. + # 32-bit
  1852. + elif test $host_cpu = i686; then
  1853. + AC_CHECK_LIB(mkl_intel, $sgemm,
  1854. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel -lmkl_sequential -lmkl_core -lpthread"],,
  1855. + [-lmkl_intel -lmkl_sequential -lmkl_core -lpthread])
  1856. + fi
  1857. + fi
  1858. +fi
  1859. +# Old versions of MKL
  1860. +if test $ax_blas_ok = no; then
  1861. + AC_CHECK_LIB(mkl, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lmkl -lguide -lpthread"],,[-lguide -lpthread])
  1862. +fi
  1863. +
  1864. +# BLAS in Apple vecLib library?
  1865. +if test $ax_blas_ok = no; then
  1866. + save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS"
  1867. + AC_MSG_CHECKING([for $sgemm in -framework vecLib])
  1868. + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes;BLAS_LIBS="-framework vecLib"])
  1869. + AC_MSG_RESULT($ax_blas_ok)
  1870. + LIBS="$save_LIBS"
  1871. +fi
  1872. +
  1873. +# BLAS in Alpha CXML library?
  1874. +if test $ax_blas_ok = no; then
  1875. + AC_CHECK_LIB(cxml, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lcxml"])
  1876. +fi
  1877. +
  1878. +# BLAS in Alpha DXML library? (now called CXML, see above)
  1879. +if test $ax_blas_ok = no; then
  1880. + AC_CHECK_LIB(dxml, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-ldxml"])
  1881. +fi
  1882. +
  1883. +# BLAS in Sun Performance library?
  1884. +if test $ax_blas_ok = no; then
  1885. + if test "x$GCC" != xyes; then # only works with Sun CC
  1886. + AC_CHECK_LIB(sunmath, acosp,
  1887. + [AC_CHECK_LIB(sunperf, $sgemm,
  1888. + [BLAS_LIBS="-xlic_lib=sunperf -lsunmath"
  1889. + ax_blas_ok=yes],[],[-lsunmath])])
  1890. + fi
  1891. +fi
  1892. +
  1893. +# BLAS in SCSL library? (SGI/Cray Scientific Library)
  1894. +if test $ax_blas_ok = no; then
  1895. + AC_CHECK_LIB(scs, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lscs"])
  1896. +fi
  1897. +
  1898. +# BLAS in SGIMATH library?
  1899. +if test $ax_blas_ok = no; then
  1900. + AC_CHECK_LIB(complib.sgimath, $sgemm,
  1901. + [ax_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"])
  1902. +fi
  1903. +
  1904. +# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
  1905. +if test $ax_blas_ok = no; then
  1906. + AC_CHECK_LIB(blas, $sgemm,
  1907. + [AC_CHECK_LIB(essl, $sgemm,
  1908. + [ax_blas_ok=yes; BLAS_LIBS="-lessl -lblas"],
  1909. + [], [-lblas $FLIBS])])
  1910. +fi
  1911. +
  1912. +# Generic BLAS library?
  1913. +if test $ax_blas_ok = no; then
  1914. + AC_CHECK_LIB(blas, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lblas"])
  1915. +fi
  1916. +
  1917. +AC_SUBST(BLAS_LIBS)
  1918. +
  1919. +LIBS="$ax_blas_save_LIBS"
  1920. +
  1921. +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
  1922. +if test x"$ax_blas_ok" = xyes; then
  1923. + ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1])
  1924. + :
  1925. +else
  1926. + ax_blas_ok=no
  1927. + $2
  1928. +fi
  1929. +])dnl AX_BLAS
  1930. diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4
  1931. new file mode 100644
  1932. --- /dev/null
  1933. +++ b/m4/ax_code_coverage.m4
  1934. @@ -0,0 +1,271 @@
  1935. +# ===========================================================================
  1936. +# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html
  1937. +# ===========================================================================
  1938. +#
  1939. +# SYNOPSIS
  1940. +#
  1941. +# AX_CODE_COVERAGE()
  1942. +#
  1943. +# DESCRIPTION
  1944. +#
  1945. +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS,
  1946. +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included
  1947. +# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every
  1948. +# build target (program or library) which should be built with code
  1949. +# coverage support. Also defines CODE_COVERAGE_RULES which should be
  1950. +# substituted in your Makefile; and $enable_code_coverage which can be
  1951. +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined
  1952. +# and substituted, and corresponds to the value of the
  1953. +# --enable-code-coverage option, which defaults to being disabled.
  1954. +#
  1955. +# Test also for gcov program and create GCOV variable that could be
  1956. +# substituted.
  1957. +#
  1958. +# Note that all optimization flags in CFLAGS must be disabled when code
  1959. +# coverage is enabled.
  1960. +#
  1961. +# Usage example:
  1962. +#
  1963. +# configure.ac:
  1964. +#
  1965. +# AX_CODE_COVERAGE
  1966. +#
  1967. +# Makefile.am:
  1968. +#
  1969. +# @CODE_COVERAGE_RULES@
  1970. +# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ...
  1971. +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ...
  1972. +# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ...
  1973. +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ...
  1974. +#
  1975. +# This results in a "check-code-coverage" rule being added to any
  1976. +# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module
  1977. +# has been configured with --enable-code-coverage). Running `make
  1978. +# check-code-coverage` in that directory will run the module's test suite
  1979. +# (`make check`) and build a code coverage report detailing the code which
  1980. +# was touched, then print the URI for the report.
  1981. +#
  1982. +# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined
  1983. +# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of
  1984. +# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is
  1985. +# deprecated. They have the same value.
  1986. +#
  1987. +# This code was derived from Makefile.decl in GLib, originally licenced
  1988. +# under LGPLv2.1+.
  1989. +#
  1990. +# LICENSE
  1991. +#
  1992. +# Copyright (c) 2012, 2016 Philip Withnall
  1993. +# Copyright (c) 2012 Xan Lopez
  1994. +# Copyright (c) 2012 Christian Persch
  1995. +# Copyright (c) 2012 Paolo Borelli
  1996. +# Copyright (c) 2012 Dan Winship
  1997. +# Copyright (c) 2015 Bastien ROUCARIES
  1998. +#
  1999. +# This library is free software; you can redistribute it and/or modify it
  2000. +# under the terms of the GNU Lesser General Public License as published by
  2001. +# the Free Software Foundation; either version 2.1 of the License, or (at
  2002. +# your option) any later version.
  2003. +#
  2004. +# This library is distributed in the hope that it will be useful, but
  2005. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  2006. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
  2007. +# General Public License for more details.
  2008. +#
  2009. +# You should have received a copy of the GNU Lesser General Public License
  2010. +# along with this program. If not, see <https://www.gnu.org/licenses/>.
  2011. +
  2012. +#serial 27
  2013. +
  2014. +AC_DEFUN([_AX_CODE_COVERAGE_ENABLED],[
  2015. + # check for gcov
  2016. + AC_CHECK_TOOL([GCOV],
  2017. + [$_AX_CODE_COVERAGE_GCOV_PROG_WITH],
  2018. + [:])
  2019. + AS_IF([test "X$GCOV" = "X:"],
  2020. + [AC_MSG_ERROR([gcov is needed to do coverage])])
  2021. + AC_SUBST([GCOV])
  2022. +
  2023. + dnl Check if gcc is being used
  2024. + AS_IF([ test "$GCC" = "no" ], [
  2025. + AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
  2026. + ])
  2027. +
  2028. + AC_CHECK_PROG([LCOV], [lcov], [lcov])
  2029. + AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
  2030. +
  2031. + AS_IF([ test x"$LCOV" = x ], [
  2032. + AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed])
  2033. + ])
  2034. +
  2035. + AS_IF([ test x"$GENHTML" = x ], [
  2036. + AC_MSG_ERROR([Could not find genhtml from the lcov package])
  2037. + ])
  2038. +
  2039. + dnl Build the code coverage flags
  2040. + dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility
  2041. + CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
  2042. + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
  2043. + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
  2044. + CODE_COVERAGE_LIBS="-lgcov"
  2045. + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS"
  2046. +
  2047. + AC_SUBST([CODE_COVERAGE_CPPFLAGS])
  2048. + AC_SUBST([CODE_COVERAGE_CFLAGS])
  2049. + AC_SUBST([CODE_COVERAGE_CXXFLAGS])
  2050. + AC_SUBST([CODE_COVERAGE_LIBS])
  2051. + AC_SUBST([CODE_COVERAGE_LDFLAGS])
  2052. +
  2053. + [CODE_COVERAGE_RULES_CHECK='
  2054. + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
  2055. + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
  2056. +']
  2057. + [CODE_COVERAGE_RULES_CAPTURE='
  2058. + $(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)
  2059. + $(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)
  2060. + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
  2061. + $(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)
  2062. + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
  2063. +']
  2064. + [CODE_COVERAGE_RULES_CLEAN='
  2065. +clean: code-coverage-clean
  2066. +distclean: code-coverage-clean
  2067. +code-coverage-clean:
  2068. + -$(LCOV) --directory $(top_builddir) -z
  2069. + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
  2070. + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete
  2071. +']
  2072. +])
  2073. +
  2074. +AC_DEFUN([_AX_CODE_COVERAGE_DISABLED],[
  2075. + [CODE_COVERAGE_RULES_CHECK='
  2076. + @echo "Need to reconfigure with --enable-code-coverage"
  2077. + ']
  2078. + CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK"
  2079. + CODE_COVERAGE_RULES_CLEAN=''
  2080. +])
  2081. +
  2082. +AC_DEFUN([AX_CODE_COVERAGE],[
  2083. + dnl Check for --enable-code-coverage
  2084. +
  2085. + # allow to override gcov location
  2086. + AC_ARG_WITH([gcov],
  2087. + [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])],
  2088. + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov],
  2089. + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov])
  2090. +
  2091. + AC_MSG_CHECKING([whether to build with code coverage support])
  2092. + AC_ARG_ENABLE([code-coverage],
  2093. + AS_HELP_STRING([--enable-code-coverage],
  2094. + [Whether to enable code coverage support]),,
  2095. + enable_code_coverage=no)
  2096. +
  2097. + AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test "x$enable_code_coverage" = xyes])
  2098. + AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
  2099. + AC_MSG_RESULT($enable_code_coverage)
  2100. +
  2101. + AS_IF([ test "x$enable_code_coverage" = xyes ], [
  2102. + _AX_CODE_COVERAGE_ENABLED
  2103. + ], [
  2104. + _AX_CODE_COVERAGE_DISABLED
  2105. + ])
  2106. +
  2107. +[CODE_COVERAGE_RULES='
  2108. +# Code coverage
  2109. +#
  2110. +# Optional:
  2111. +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
  2112. +# Multiple directories may be specified, separated by whitespace.
  2113. +# (Default: $(top_builddir))
  2114. +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
  2115. +# by lcov for code coverage. (Default:
  2116. +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
  2117. +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
  2118. +# reports to be created. (Default:
  2119. +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
  2120. +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,
  2121. +# set to 0 to disable it and leave empty to stay with the default.
  2122. +# (Default: empty)
  2123. +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov
  2124. +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
  2125. +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov
  2126. +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
  2127. +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
  2128. +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the
  2129. +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
  2130. +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov
  2131. +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
  2132. +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering
  2133. +# lcov instance. (Default: empty)
  2134. +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov
  2135. +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
  2136. +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the
  2137. +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
  2138. +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
  2139. +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
  2140. +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
  2141. +#
  2142. +# The generated report will be titled using the $(PACKAGE_NAME) and
  2143. +# $(PACKAGE_VERSION). In order to add the current git hash to the title,
  2144. +# use the git-version-gen script, available online.
  2145. +
  2146. +# Optional variables
  2147. +CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
  2148. +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
  2149. +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
  2150. +CODE_COVERAGE_BRANCH_COVERAGE ?=
  2151. +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
  2152. +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
  2153. +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
  2154. +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
  2155. +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
  2156. +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
  2157. +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=
  2158. +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
  2159. +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
  2160. +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
  2161. +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
  2162. +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
  2163. +CODE_COVERAGE_IGNORE_PATTERN ?=
  2164. +
  2165. +GITIGNOREFILES ?=
  2166. +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
  2167. +
  2168. +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
  2169. +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
  2170. +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\
  2171. + $(CODE_COVERAGE_OUTPUT_FILE);
  2172. +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))
  2173. +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))
  2174. +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\
  2175. + $(CODE_COVERAGE_IGNORE_PATTERN);
  2176. +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))
  2177. +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))
  2178. +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY);
  2179. +code_coverage_quiet = $(code_coverage_quiet_$(V))
  2180. +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
  2181. +code_coverage_quiet_0 = --quiet
  2182. +
  2183. +# sanitizes the test-name: replaces with underscores: dashes and dots
  2184. +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))
  2185. +
  2186. +# Use recursive makes in order to ignore errors during check
  2187. +check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"'
  2188. +
  2189. +# Capture code coverage data
  2190. +code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"'
  2191. +
  2192. +# Hook rule executed before code-coverage-capture, overridable by the user
  2193. +code-coverage-capture-hook:
  2194. +
  2195. +'"$CODE_COVERAGE_RULES_CLEAN"'
  2196. +
  2197. +A''M_DISTCHECK_CONFIGURE_FLAGS ?=
  2198. +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
  2199. +
  2200. +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
  2201. +']
  2202. +
  2203. + AC_SUBST([CODE_COVERAGE_RULES])
  2204. + m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])])
  2205. +])
  2206. diff --git a/m4/ax_lapack.m4 b/m4/ax_lapack.m4
  2207. new file mode 100644
  2208. --- /dev/null
  2209. +++ b/m4/ax_lapack.m4
  2210. @@ -0,0 +1,134 @@
  2211. +# ===========================================================================
  2212. +# https://www.gnu.org/software/autoconf-archive/ax_lapack.html
  2213. +# ===========================================================================
  2214. +#
  2215. +# SYNOPSIS
  2216. +#
  2217. +# AX_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
  2218. +#
  2219. +# DESCRIPTION
  2220. +#
  2221. +# This macro looks for a library that implements the LAPACK linear-algebra
  2222. +# interface (see http://www.netlib.org/lapack/). On success, it sets the
  2223. +# LAPACK_LIBS output variable to hold the requisite library linkages.
  2224. +#
  2225. +# To link with LAPACK, you should link with:
  2226. +#
  2227. +# $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS
  2228. +#
  2229. +# in that order. BLAS_LIBS is the output variable of the AX_BLAS macro,
  2230. +# called automatically. FLIBS is the output variable of the
  2231. +# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by AX_BLAS), and is
  2232. +# sometimes necessary in order to link with F77 libraries. Users will also
  2233. +# need to use AC_F77_DUMMY_MAIN (see the autoconf manual), for the same
  2234. +# reason.
  2235. +#
  2236. +# The user may also use --with-lapack=<lib> in order to use some specific
  2237. +# LAPACK library <lib>. In order to link successfully, however, be aware
  2238. +# that you will probably need to use the same Fortran compiler (which can
  2239. +# be set via the F77 env. var.) as was used to compile the LAPACK and BLAS
  2240. +# libraries.
  2241. +#
  2242. +# ACTION-IF-FOUND is a list of shell commands to run if a LAPACK library
  2243. +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
  2244. +# is not found. If ACTION-IF-FOUND is not specified, the default action
  2245. +# will define HAVE_LAPACK.
  2246. +#
  2247. +# LICENSE
  2248. +#
  2249. +# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
  2250. +# Copyright (c) 2019 Geoffrey M. Oxberry <goxberry@gmail.com>
  2251. +#
  2252. +# This program is free software: you can redistribute it and/or modify it
  2253. +# under the terms of the GNU General Public License as published by the
  2254. +# Free Software Foundation, either version 3 of the License, or (at your
  2255. +# option) any later version.
  2256. +#
  2257. +# This program is distributed in the hope that it will be useful, but
  2258. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  2259. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  2260. +# Public License for more details.
  2261. +#
  2262. +# You should have received a copy of the GNU General Public License along
  2263. +# with this program. If not, see <https://www.gnu.org/licenses/>.
  2264. +#
  2265. +# As a special exception, the respective Autoconf Macro's copyright owner
  2266. +# gives unlimited permission to copy, distribute and modify the configure
  2267. +# scripts that are the output of Autoconf when processing the Macro. You
  2268. +# need not follow the terms of the GNU General Public License when using
  2269. +# or distributing such scripts, even though portions of the text of the
  2270. +# Macro appear in them. The GNU General Public License (GPL) does govern
  2271. +# all other use of the material that constitutes the Autoconf Macro.
  2272. +#
  2273. +# This special exception to the GPL applies to versions of the Autoconf
  2274. +# Macro released by the Autoconf Archive. When you make and distribute a
  2275. +# modified version of the Autoconf Macro, you may extend this special
  2276. +# exception to the GPL to apply to your modified version as well.
  2277. +
  2278. +#serial 10
  2279. +
  2280. +AU_ALIAS([ACX_LAPACK], [AX_LAPACK])
  2281. +AC_DEFUN([AX_LAPACK], [
  2282. +AC_REQUIRE([AX_BLAS])
  2283. +ax_lapack_ok=no
  2284. +
  2285. +AC_ARG_WITH(lapack,
  2286. + [AS_HELP_STRING([--with-lapack=<lib>], [use LAPACK library <lib>])])
  2287. +case $with_lapack in
  2288. + yes | "") ;;
  2289. + no) ax_lapack_ok=disable ;;
  2290. + -* | */* | *.a | *.so | *.so.* | *.dylib | *.dylib.* | *.o)
  2291. + LAPACK_LIBS="$with_lapack"
  2292. + ;;
  2293. + *) LAPACK_LIBS="-l$with_lapack" ;;
  2294. +esac
  2295. +
  2296. +# Get fortran linker name of LAPACK function to check for.
  2297. +AC_F77_FUNC(cheev)
  2298. +
  2299. +# We cannot use LAPACK if BLAS is not found
  2300. +if test "x$ax_blas_ok" != xyes; then
  2301. + ax_lapack_ok=noblas
  2302. + LAPACK_LIBS=""
  2303. +fi
  2304. +
  2305. +# First, check LAPACK_LIBS environment variable
  2306. +if test "x$LAPACK_LIBS" != x; then
  2307. + save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"
  2308. + AC_MSG_CHECKING([for $cheev in $LAPACK_LIBS])
  2309. + AC_LINK_IFELSE([AC_LANG_CALL([], [$cheev])], [ax_lapack_ok=yes], [LAPACK_LIBS=""])
  2310. + AC_MSG_RESULT($ax_lapack_ok)
  2311. + LIBS="$save_LIBS"
  2312. + if test $ax_lapack_ok = no; then
  2313. + LAPACK_LIBS=""
  2314. + fi
  2315. +fi
  2316. +
  2317. +# LAPACK linked to by default? (is sometimes included in BLAS lib)
  2318. +if test $ax_lapack_ok = no; then
  2319. + save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS"
  2320. + AC_CHECK_FUNC($cheev, [ax_lapack_ok=yes])
  2321. + LIBS="$save_LIBS"
  2322. +fi
  2323. +
  2324. +# Generic LAPACK library?
  2325. +for lapack in lapack lapack_rs6k; do
  2326. + if test $ax_lapack_ok = no; then
  2327. + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
  2328. + AC_CHECK_LIB($lapack, $cheev,
  2329. + [ax_lapack_ok=yes; LAPACK_LIBS="-l$lapack"], [], [$FLIBS])
  2330. + LIBS="$save_LIBS"
  2331. + fi
  2332. +done
  2333. +
  2334. +AC_SUBST(LAPACK_LIBS)
  2335. +
  2336. +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
  2337. +if test x"$ax_lapack_ok" = xyes; then
  2338. + ifelse([$1],,AC_DEFINE(HAVE_LAPACK,1,[Define if you have LAPACK library.]),[$1])
  2339. + :
  2340. +else
  2341. + ax_lapack_ok=no
  2342. + $2
  2343. +fi
  2344. +])dnl AX_LAPACK