autotoolize.diff 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663
  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,26 @@
  6. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  7. +
  8. +EXTRA_DIST = \
  9. + License.txt \
  10. + lesser.txt
  11. +
  12. +CHECKSRC = \
  13. + cholmod_check.c \
  14. + cholmod_read.c \
  15. + cholmod_write.c
  16. +
  17. +noinst_LTLIBRARIES = \
  18. + libchecki.la \
  19. + libcheckl.la \
  20. + libcheck.la
  21. +
  22. +libchecki_la_SOURCES = $(CHECKSRC)
  23. +libchecki_la_LIBADD = $(SUITESPARSECONFIG_LIBS)
  24. +libchecki_la_CPPFLAGS= $(AM_CPPFLAGS)
  25. +
  26. +libcheckl_la_SOURCES = $(CHECKSRC)
  27. +libcheckl_la_LIBADD = $(SUITESPARSECONFIG_LIBS)
  28. +libcheckl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  29. +
  30. +libcheck_la_SOURCES =
  31. +libcheck_la_LIBADD = libchecki.la libcheckl.la
  32. diff --git a/Cholesky/Makefile.am b/Cholesky/Makefile.am
  33. new file mode 100644
  34. --- /dev/null
  35. +++ b/Cholesky/Makefile.am
  36. @@ -0,0 +1,41 @@
  37. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(COLAMD_CFLAGS) $(AMD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS)
  38. +
  39. +EXTRA_DIST = \
  40. + License.txt \
  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
  70. +libcholeskyi_la_CPPFLAGS = $(AM_CPPFLAGS)
  71. +
  72. +libcholeskyl_la_SOURCES = $(CHOLESKYSRC)
  73. +libcholeskyl_la_LIBADD = $(COLAMD_LIBS) $(AMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm
  74. +libcholeskyl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  75. +
  76. +libcholesky_la_SOURCES =
  77. +libcholesky_la_LIBADD = libcholeskyi.la libcholeskyl.la
  78. diff --git a/Core/Makefile.am b/Core/Makefile.am
  79. new file mode 100644
  80. --- /dev/null
  81. +++ b/Core/Makefile.am
  82. @@ -0,0 +1,44 @@
  83. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  84. +
  85. +EXTRA_DIST = \
  86. + License.txt \
  87. + lesser.txt
  88. +
  89. +CORESRC = \
  90. + cholmod_aat.c \
  91. + cholmod_add.c \
  92. + cholmod_band.c \
  93. + cholmod_change_factor.c \
  94. + cholmod_common.c \
  95. + cholmod_complex.c \
  96. + cholmod_copy.c \
  97. + cholmod_dense.c \
  98. + cholmod_error.c \
  99. + cholmod_factor.c \
  100. + cholmod_memory.c \
  101. + cholmod_sparse.c \
  102. + cholmod_transpose.c \
  103. + cholmod_triplet.c \
  104. + cholmod_version.c
  105. +
  106. +noinst_HEADERS = \
  107. + t_cholmod_change_factor.c \
  108. + t_cholmod_dense.c \
  109. + t_cholmod_transpose.c \
  110. + t_cholmod_triplet.c
  111. +
  112. +noinst_LTLIBRARIES = \
  113. + libcorei.la \
  114. + libcorel.la \
  115. + libcore.la
  116. +
  117. +libcorei_la_SOURCES = $(CORESRC)
  118. +libcorei_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm
  119. +libcorei_la_CPPFLAGS = $(AM_CPPFLAGS)
  120. +
  121. +libcorel_la_SOURCES = $(CORESRC)
  122. +libcorel_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm
  123. +libcorel_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  124. +
  125. +libcore_la_SOURCES =
  126. +libcore_la_LIBADD = libcorei.la libcorel.la
  127. diff --git a/Demo/Makefile.am b/Demo/Makefile.am
  128. new file mode 100644
  129. --- /dev/null
  130. +++ b/Demo/Makefile.am
  131. @@ -0,0 +1,60 @@
  132. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  133. +
  134. +EXTRA_DIST = \
  135. + License.txt \
  136. + gpl.txt
  137. +
  138. +dist_noinst_HEADERS = \
  139. + cholmod_demo.h
  140. +
  141. +dist_noinst_DATA = \
  142. + Matrix/bcsstk01.tri \
  143. + Matrix/lp_afiro.tri \
  144. + Matrix/can___24.mtx \
  145. + Matrix/c.tri
  146. +
  147. +noinst_PROGRAMS = \
  148. + reade \
  149. + readhb \
  150. + readhb2
  151. +
  152. +reade_SOURCES = reade.f
  153. +readhb_SOURCES = readhb.f
  154. +readhb2_SOURCES = readhb2.f
  155. +
  156. +if MOD_CHOLESKY
  157. +if MOD_CHECK
  158. +if MOD_MATRIXOPS
  159. +
  160. +check_PROGRAMS = \
  161. + cholmod_demo \
  162. + cholmod_l_demo \
  163. + cholmod_simple
  164. +
  165. +cholmod_demo_SOURCES = cholmod_demo.c
  166. +cholmod_demo_LDADD = $(top_builddir)/libcholmod.la $(SUITESPARSECONFIG_LIBS)
  167. +
  168. +cholmod_l_demo_SOURCES = cholmod_l_demo.c
  169. +cholmod_l_demo_LDADD = $(top_builddir)/libcholmod.la $(SUITESPARSECONFIG_LIBS)
  170. +
  171. +cholmod_simple_SOURCES = cholmod_simple.c
  172. +cholmod_simple_LDADD = $(top_builddir)/libcholmod.la
  173. +
  174. +check-local: $(check_PROGRAMS) $(dist_noinst_DATA)
  175. + ./cholmod_demo < $(srcdir)/Matrix/bcsstk01.tri
  176. + ./cholmod_l_demo < $(srcdir)/Matrix/bcsstk01.tri
  177. + ./cholmod_demo < $(srcdir)/Matrix/lp_afiro.tri
  178. + ./cholmod_l_demo < $(srcdir)/Matrix/lp_afiro.tri
  179. + ./cholmod_demo < $(srcdir)/Matrix/can___24.mtx
  180. + ./cholmod_l_demo < $(srcdir)/Matrix/can___24.mtx
  181. + ./cholmod_demo < $(srcdir)/Matrix/c.tri
  182. + ./cholmod_l_demo < $(srcdir)/Matrix/c.tri
  183. + ./cholmod_simple < $(srcdir)/Matrix/c.tri
  184. + ./cholmod_simple < $(srcdir)/Matrix/can___24.mtx
  185. + ./cholmod_simple < $(srcdir)/Matrix/bcsstk01.tri
  186. +
  187. +endif
  188. +endif
  189. +endif
  190. +
  191. +CLEANFILES = timelog.m
  192. diff --git a/Doc/Makefile.am b/Doc/Makefile.am
  193. new file mode 100644
  194. --- /dev/null
  195. +++ b/Doc/Makefile.am
  196. @@ -0,0 +1,437 @@
  197. +EXTRA_DIST = \
  198. + ChangeLog
  199. +
  200. +dist_noinst_DATA = \
  201. + UserGuide.bib \
  202. + UserGuide.tex \
  203. + header.tex \
  204. + footer.tex \
  205. + mheader.tex \
  206. + mfooter.tex \
  207. + mfile.awk \
  208. + rule.awk
  209. +
  210. +dist_pdf_DATA = \
  211. + UserGuide.pdf
  212. +
  213. +dist_noinst_SCRIPTS = \
  214. + getmproto \
  215. + getproto
  216. +
  217. +# ./getmproto file.m > _file_m.tex
  218. +define getmproto =
  219. +( \
  220. +cat $(srcdir)/mheader.tex; \
  221. +expand -8 $< | awk -f $(srcdir)/mfile.awk; \
  222. +cat $(srcdir)/mfooter.tex; \
  223. +) > $@
  224. +endef
  225. +
  226. +# ./getproto 'proto' header.h > _file.tex
  227. +define getproto =
  228. +( \
  229. +echo -n $(PATTERN); \
  230. +cat $(srcdir)/rule.awk; \
  231. +) > $(basename $@).awk
  232. +( \
  233. +cat $(srcdir)/header.tex; \
  234. +expand -8 $< | awk -f $(basename $@).awk; \
  235. +cat $(srcdir)/footer.tex; \
  236. +) > $@
  237. +$(RM) $(basename $@).awk
  238. +endef
  239. +
  240. +PROTO_M = \
  241. + _analyze_m.tex \
  242. + _bisect_m.tex \
  243. + _chol2_m.tex \
  244. + _cholmod2_m.tex \
  245. + _cholmod_demo_m.tex \
  246. + _cholmod_make_m.tex \
  247. + _etree2_m.tex \
  248. + _graph_demo_m.tex \
  249. + _lchol_m.tex \
  250. + _ldl_normest_m.tex \
  251. + _ldlchol_m.tex \
  252. + _ldlsolve_m.tex \
  253. + _ldlsplit_m.tex \
  254. + _ldlupdate_m.tex \
  255. + _ldlrowmod_m.tex \
  256. + _metis_m.tex \
  257. + _mread_m.tex \
  258. + _mwrite_m.tex \
  259. + _nesdis_m.tex \
  260. + _resymbol_m.tex \
  261. + _sdmult_m.tex \
  262. + _sparse2_m.tex \
  263. + _spsym_m.tex \
  264. + _symbfact2_m.tex
  265. +
  266. +$(PROTO_M): mheader.tex mfile.awk mfooter.tex
  267. +_%_m.tex: $(top_srcdir)/MATLAB/%.m
  268. + $(getmproto)
  269. +
  270. +PROTO_SIMPLE = \
  271. + _simple.tex
  272. +
  273. +_simple.tex: PATTERN = '/include/, /^}/'
  274. +
  275. +$(PROTO_SIMPLE): $(top_srcdir)/Demo/cholmod_simple.c header.tex rule.awk footer.tex
  276. + $(getproto)
  277. +
  278. +PROTO_CORE = \
  279. + _common.tex \
  280. + _start.tex \
  281. + _finish.tex \
  282. + _defaults.tex \
  283. + _maxrank.tex \
  284. + _allocate_work.tex \
  285. + _free_work.tex \
  286. + _clear_flag.tex \
  287. + _error.tex \
  288. + _dbound.tex \
  289. + _hypot.tex \
  290. + _divcomplex.tex \
  291. + _sparse.tex \
  292. + _allocate_sparse.tex \
  293. + _free_sparse.tex \
  294. + _reallocate_sparse.tex \
  295. + _nnz.tex \
  296. + _speye.tex \
  297. + _spzeros.tex \
  298. + _transpose.tex \
  299. + _transpose_unsym.tex \
  300. + _transpose_sym.tex \
  301. + _ptranspose.tex \
  302. + _sort.tex \
  303. + _band.tex \
  304. + _band_inplace.tex \
  305. + _aat.tex \
  306. + _copy_sparse.tex \
  307. + _copy.tex \
  308. + _add.tex \
  309. + _sparse_xtype.tex \
  310. + _factor.tex \
  311. + _allocate_factor.tex \
  312. + _free_factor.tex \
  313. + _reallocate_factor.tex \
  314. + _change_factor.tex \
  315. + _pack_factor.tex \
  316. + _reallocate_column.tex \
  317. + _factor_to_sparse.tex \
  318. + _copy_factor.tex \
  319. + _factor_xtype.tex \
  320. + _dense.tex \
  321. + _allocate_dense.tex \
  322. + _ensure_dense.tex \
  323. + _zeros.tex \
  324. + _ones.tex \
  325. + _eye.tex \
  326. + _free_dense.tex \
  327. + _sparse_to_dense.tex \
  328. + _dense_to_sparse.tex \
  329. + _copy_dense.tex \
  330. + _copy_dense2.tex \
  331. + _dense_xtype.tex \
  332. + _triplet.tex \
  333. + _allocate_triplet.tex \
  334. + _free_triplet.tex \
  335. + _reallocate_triplet.tex \
  336. + _sparse_to_triplet.tex \
  337. + _triplet_to_sparse.tex \
  338. + _copy_triplet.tex \
  339. + _triplet_xtype.tex \
  340. + _malloc.tex \
  341. + _calloc.tex \
  342. + _free.tex \
  343. + _realloc.tex \
  344. + _realloc_multiple.tex \
  345. + _version.tex \
  346. + _defn.tex
  347. +
  348. +_common.tex: PATTERN = '/typedef struct cholmod_common/, /^}/'
  349. +_start.tex: PATTERN = '/int cholmod_start/, /\*\) ;/'
  350. +_finish.tex: PATTERN = '/int cholmod_finish/, /\*\) ;/'
  351. +_defaults.tex: PATTERN = '/int cholmod_defaults/, /\*\) ;/'
  352. +_maxrank.tex: PATTERN = '/size_t cholmod_maxrank/, /\*\) ;/'
  353. +_allocate_work.tex: PATTERN = '/int cholmod_allocate_work/, /\*\) ;/'
  354. +_free_work.tex: PATTERN = '/int cholmod_free_work/, /\*\) ;/'
  355. +_clear_flag.tex: PATTERN = '/long cholmod_clear_flag/, /\*\) ;/'
  356. +_error.tex: PATTERN = '/int cholmod_error/, /\*\) ;/'
  357. +_dbound.tex: PATTERN = '/double cholmod_dbound/, /\*\) ;/'
  358. +_hypot.tex: PATTERN = '/double cholmod_hypot/, /double\) ;/'
  359. +_divcomplex.tex: PATTERN = '/int cholmod_divcomplex/, /\*\) ;/'
  360. +_sparse.tex: PATTERN = '/typedef struct cholmod_sparse/, /^}/'
  361. +_allocate_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_allocate_sparse/, /\*\) ;/'
  362. +_free_sparse.tex: PATTERN = '/int cholmod_free_sparse/, /\*\) ;/'
  363. +_reallocate_sparse.tex: PATTERN = '/int cholmod_reallocate_sparse/, /\*\) ;/'
  364. +_nnz.tex: PATTERN = '/long cholmod_nnz/, /\*\) ;/'
  365. +_speye.tex: PATTERN = '/cholmod_sparse \*cholmod_speye/, /\*\) ;/'
  366. +_spzeros.tex: PATTERN = '/cholmod_sparse \*cholmod_spzeros/, /\*\) ;/'
  367. +_transpose.tex: PATTERN = '/cholmod_sparse \*cholmod_transpose/, /\*\) ;/'
  368. +_transpose_unsym.tex: PATTERN = '/int cholmod_transpose_unsym/, /\*\) ;/'
  369. +_transpose_sym.tex: PATTERN = '/int cholmod_transpose_sym/, /\*\) ;/'
  370. +_ptranspose.tex: PATTERN = '/cholmod_sparse \*cholmod_ptranspose/, /\*\) ;/'
  371. +_sort.tex: PATTERN = '/int cholmod_sort/, /\*\) ;/'
  372. +_band.tex: PATTERN = '/cholmod_sparse \*cholmod_band/, /\*\) ;/'
  373. +_band_inplace.tex: PATTERN = '/int cholmod_band_inplace/, /\*\) ;/'
  374. +_aat.tex: PATTERN = '/cholmod_sparse \*cholmod_aat/, /\*\) ;/'
  375. +_copy_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_copy_sparse/, /\*\) ;/'
  376. +_copy.tex: PATTERN = '/cholmod_sparse \*cholmod_copy /, /\*\) ;/'
  377. +_add.tex: PATTERN = '/cholmod_sparse \*cholmod_add/, /\*\) ;/'
  378. +_sparse_xtype.tex: PATTERN = '/int cholmod_sparse_xtype/, /\*\) ;/'
  379. +_factor.tex: PATTERN = '/typedef struct cholmod_factor/, /^}/'
  380. +_allocate_factor.tex: PATTERN = '/cholmod_factor \*cholmod_allocate_factor/, /\*\) ;/'
  381. +_free_factor.tex: PATTERN = '/int cholmod_free_factor/, /\*\) ;/'
  382. +_reallocate_factor.tex: PATTERN = '/int cholmod_reallocate_factor/, /\*\) ;/'
  383. +_change_factor.tex: PATTERN = '/int cholmod_change_factor/, /\*\) ;/'
  384. +_pack_factor.tex: PATTERN = '/int cholmod_pack_factor/, /\*\) ;/'
  385. +_reallocate_column.tex: PATTERN = '/int cholmod_reallocate_column/, /\*\) ;/'
  386. +_factor_to_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_factor_to_sparse/, /\*\) ;/'
  387. +_copy_factor.tex: PATTERN = '/cholmod_factor \*cholmod_copy_factor/, /\*\) ;/'
  388. +_factor_xtype.tex: PATTERN = '/int cholmod_factor_xtype/, /\*\) ;/'
  389. +_dense.tex: PATTERN = '/typedef struct cholmod_dense/, /^}/'
  390. +_allocate_dense.tex: PATTERN = '/cholmod_dense \*cholmod_allocate_dense/, /\*\) ;/'
  391. +_ensure_dense.tex: PATTERN = '/cholmod_dense \*cholmod_ensure_dense/, /\*\) ;/'
  392. +_zeros.tex: PATTERN = '/cholmod_dense \*cholmod_zeros/, /\*\) ;/'
  393. +_ones.tex: PATTERN = '/cholmod_dense \*cholmod_ones/, /\*\) ;/'
  394. +_eye.tex: PATTERN = '/cholmod_dense \*cholmod_eye/, /\*\) ;/'
  395. +_free_dense.tex: PATTERN = '/int cholmod_free_dense/, /\*\) ;/'
  396. +_sparse_to_dense.tex: PATTERN = '/cholmod_dense \*cholmod_sparse_to_dense/, /\*\) ;/'
  397. +_dense_to_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_dense_to_sparse/, /\*\) ;/'
  398. +_copy_dense.tex: PATTERN = '/cholmod_dense \*cholmod_copy_dense/, /\*\) ;/'
  399. +_copy_dense2.tex: PATTERN = '/int cholmod_copy_dense2/, /\*\) ;/'
  400. +_dense_xtype.tex: PATTERN = '/int cholmod_dense_xtype/, /\*\) ;/'
  401. +_triplet.tex: PATTERN = '/typedef struct cholmod_triplet/, /^}/'
  402. +_allocate_triplet.tex: PATTERN = '/cholmod_triplet \*cholmod_allocate_triplet/, /\*\) ;/'
  403. +_free_triplet.tex: PATTERN = '/int cholmod_free_triplet/, /\*\) ;/'
  404. +_reallocate_triplet.tex: PATTERN = '/int cholmod_reallocate_triplet/, /\*\) ;/'
  405. +_sparse_to_triplet.tex: PATTERN = '/cholmod_triplet \*cholmod_sparse_to_triplet/, /\*\) ;/'
  406. +_triplet_to_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_triplet_to_sparse/, /\*\) ;/'
  407. +_copy_triplet.tex: PATTERN = '/cholmod_triplet \*cholmod_copy_triplet/, /\*\) ;/'
  408. +_triplet_xtype.tex: PATTERN = '/int cholmod_triplet_xtype/, /\*\) ;/'
  409. +_malloc.tex: PATTERN = '/void \*cholmod_malloc/, /\*\) ;/'
  410. +_calloc.tex: PATTERN = '/void \*cholmod_calloc/, /\*\) ;/'
  411. +_free.tex: PATTERN = '/void \*cholmod_free/, /\*\) ;/'
  412. +_realloc.tex: PATTERN = '/void \*cholmod_realloc/, /\*\) ;/'
  413. +_realloc_multiple.tex: PATTERN = '/int cholmod_realloc_multiple/, /\*\) ;/'
  414. +_version.tex: PATTERN = '/int cholmod_version/, /l_version/'
  415. +_defn.tex: PATTERN = '/itype defines the/, /define CHOLMOD_SUPERNODAL/'
  416. +
  417. +$(PROTO_CORE): $(top_srcdir)/Include/cholmod_core.h header.tex rule.awk footer.tex
  418. + $(getproto)
  419. +
  420. +PROTO_CHECK = \
  421. + _check_common.tex \
  422. + _print_common.tex \
  423. + _check_sparse.tex \
  424. + _print_sparse.tex \
  425. + _check_dense.tex \
  426. + _print_dense.tex \
  427. + _check_factor.tex \
  428. + _print_factor.tex \
  429. + _check_triplet.tex \
  430. + _print_triplet.tex \
  431. + _check_subset.tex \
  432. + _print_subset.tex \
  433. + _check_perm.tex \
  434. + _print_perm.tex \
  435. + _check_parent.tex \
  436. + _print_parent.tex \
  437. + _read_triplet.tex \
  438. + _read_sparse.tex \
  439. + _read_dense.tex \
  440. + _read_matrix.tex \
  441. + _write_sparse.tex \
  442. + _write_dense.tex
  443. +
  444. +_check_common.tex: PATTERN = '/int cholmod_check_common/, /\*\) ;/'
  445. +_print_common.tex: PATTERN = '/int cholmod_print_common/, /\*\) ;/'
  446. +_check_sparse.tex: PATTERN = '/int cholmod_check_sparse/, /\*\) ;/'
  447. +_print_sparse.tex: PATTERN = '/int cholmod_print_sparse/, /\*\) ;/'
  448. +_check_dense.tex: PATTERN = '/int cholmod_check_dense/, /\*\) ;/'
  449. +_print_dense.tex: PATTERN = '/int cholmod_print_dense/, /\*\) ;/'
  450. +_check_factor.tex: PATTERN = '/int cholmod_check_factor/, /\*\) ;/'
  451. +_print_factor.tex: PATTERN = '/int cholmod_print_factor/, /\*\) ;/'
  452. +_check_triplet.tex: PATTERN = '/int cholmod_check_triplet/, /\*\) ;/'
  453. +_print_triplet.tex: PATTERN = '/int cholmod_print_triplet/, /\*\) ;/'
  454. +_check_subset.tex: PATTERN = '/int cholmod_check_subset/, /\*\) ;/'
  455. +_print_subset.tex: PATTERN = '/int cholmod_print_subset/, /\*\) ;/'
  456. +_check_perm.tex: PATTERN = '/int cholmod_check_perm/, /\*\) ;/'
  457. +_print_perm.tex: PATTERN = '/int cholmod_print_perm/, /\*\) ;/'
  458. +_check_parent.tex: PATTERN = '/int cholmod_check_parent/, /\*\) ;/'
  459. +_print_parent.tex: PATTERN = '/int cholmod_print_parent/, /\*\) ;/'
  460. +_read_triplet.tex: PATTERN = '/cholmod_triplet \*cholmod_read_triplet/, /\*\) ;/'
  461. +_read_sparse.tex: PATTERN = '/cholmod_sparse \*cholmod_read_sparse/, /\*\) ;/'
  462. +_read_dense.tex: PATTERN = '/cholmod_dense \*cholmod_read_dense/, /\*\) ;/'
  463. +_read_matrix.tex: PATTERN = '/void \*cholmod_read_matrix/, /\*\) ;/'
  464. +_write_sparse.tex: PATTERN = '/int cholmod_write_sparse/, /\*\) ;/'
  465. +_write_dense.tex: PATTERN = '/int cholmod_write_dense/, /\*\) ;/'
  466. +
  467. +$(PROTO_CHECK): $(top_srcdir)/Include/cholmod_check.h header.tex rule.awk footer.tex
  468. + $(getproto)
  469. +
  470. +PROTO_CHOLESKY = \
  471. + _analyze.tex \
  472. + _analyze_p.tex \
  473. + _factorize.tex \
  474. + _factorize_p.tex \
  475. + _solve.tex \
  476. + _solve2.tex \
  477. + _spsolve.tex \
  478. + _etree.tex \
  479. + _rowcolcounts.tex \
  480. + _analyze_ordering.tex \
  481. + _amd.tex \
  482. + _colamd.tex \
  483. + _rowfac.tex \
  484. + _rowfac_mask.tex \
  485. + _row_subtree.tex \
  486. + _row_lsubtree.tex \
  487. + _lsolve_pattern.tex \
  488. + _resymbol.tex \
  489. + _resymbol_noperm.tex \
  490. + _rcond.tex \
  491. + _postorder.tex
  492. +
  493. +_analyze.tex: PATTERN = '/cholmod_factor \*cholmod_analyze /, /\*\) ;/'
  494. +_analyze_p.tex: PATTERN = '/cholmod_factor \*cholmod_analyze_p/, /\*\) ;/'
  495. +_factorize.tex: PATTERN = '/int cholmod_factorize /, /\*\) ;/'
  496. +_factorize_p.tex: PATTERN = '/int cholmod_factorize_p/, /\*\) ;/'
  497. +_solve.tex: PATTERN = '/cholmod_dense \*cholmod_solve/, /\*\) ;/'
  498. +_solve2.tex: PATTERN = '/int cholmod_solve2/, /\*\) ;/'
  499. +_spsolve.tex: PATTERN = '/cholmod_sparse \*cholmod_spsolve/, /\*\) ;/'
  500. +_etree.tex: PATTERN = '/int cholmod_etree/, /\*\) ;/'
  501. +_rowcolcounts.tex: PATTERN = '/int cholmod_rowcolcounts/, /\*\) ;/'
  502. +_analyze_ordering.tex: PATTERN = '/int cholmod_analyze_ordering/, /\*\) ;/'
  503. +_amd.tex: PATTERN = '/int cholmod_amd/, /\*\) ;/'
  504. +_colamd.tex: PATTERN = '/int cholmod_colamd/, /\*\) ;/'
  505. +_rowfac.tex: PATTERN = '/int cholmod_rowfac/, /\*\) ;/'
  506. +_rowfac_mask.tex: PATTERN = '/int cholmod_rowfac_mask/, /\*\) ;/'
  507. +_row_subtree.tex: PATTERN = '/int cholmod_row_subtree/, /\*\) ;/'
  508. +_row_lsubtree.tex: PATTERN = '/int cholmod_row_lsubtree/, /\*\) ;/'
  509. +_lsolve_pattern.tex: PATTERN = '/int cholmod_lsolve_pattern/, /\*\) ;/'
  510. +_resymbol.tex: PATTERN = '/int cholmod_resymbol /, /\*\) ;/'
  511. +_resymbol_noperm.tex: PATTERN = '/int cholmod_resymbol_noperm/, /\*\) ;/'
  512. +_rcond.tex: PATTERN = '/double cholmod_rcond/, /\*\) ;/'
  513. +_postorder.tex: PATTERN = '/long cholmod_postorder/, /\*\) ;/'
  514. +
  515. +$(PROTO_CHOLESKY): $(top_srcdir)/Include/cholmod_cholesky.h header.tex rule.awk footer.tex
  516. + $(getproto)
  517. +
  518. +PROTO_MODIFY = \
  519. + _updown.tex \
  520. + _updown_solve.tex \
  521. + _updown_mark.tex \
  522. + _updown_mask.tex \
  523. + _rowadd.tex \
  524. + _rowadd_solve.tex \
  525. + _rowadd_mark.tex \
  526. + _rowdel.tex \
  527. + _rowdel_solve.tex \
  528. + _rowdel_mark.tex
  529. +
  530. +_updown.tex: PATTERN = '/int cholmod_updown /, /\*\) ;/'
  531. +_updown_solve.tex: PATTERN = '/int cholmod_updown_solve/, /\*\) ;/'
  532. +_updown_mark.tex: PATTERN = '/int cholmod_updown_mark/, /\*\) ;/'
  533. +_updown_mask.tex: PATTERN = '/int cholmod_updown_mask/, /\*\) ;/'
  534. +_rowadd.tex: PATTERN = '/int cholmod_rowadd /, /\*\) ;/'
  535. +_rowadd_solve.tex: PATTERN = '/int cholmod_rowadd_solve/, /\*\) ;/'
  536. +_rowadd_mark.tex: PATTERN = '/int cholmod_rowadd_mark/, /\*\) ;/'
  537. +_rowdel.tex: PATTERN = '/int cholmod_rowdel /, /\*\) ;/'
  538. +_rowdel_solve.tex: PATTERN = '/int cholmod_rowdel_solve/, /\*\) ;/'
  539. +_rowdel_mark.tex: PATTERN = '/int cholmod_rowdel_mark/, /\*\) ;/'
  540. +
  541. +$(PROTO_MODIFY): $(top_srcdir)/Include/cholmod_modify.h header.tex rule.awk footer.tex
  542. + $(getproto)
  543. +
  544. +PROTO_MATRIXOPS = \
  545. + _drop.tex \
  546. + _norm_dense.tex \
  547. + _norm_sparse.tex \
  548. + _horzcat.tex \
  549. + _scale.tex \
  550. + _sdmult.tex \
  551. + _ssmult.tex \
  552. + _submatrix.tex \
  553. + _vertcat.tex \
  554. + _symmetry.tex
  555. +
  556. +_drop.tex: PATTERN = '/int cholmod_drop/, /\*\) ;/'
  557. +_norm_dense.tex: PATTERN = '/double cholmod_norm_dense/, /\*\) ;/'
  558. +_norm_sparse.tex: PATTERN = '/double cholmod_norm_sparse/, /\*\) ;/'
  559. +_horzcat.tex: PATTERN = '/cholmod_sparse \*cholmod_horzcat/, /\*\) ;/'
  560. +_scale.tex: PATTERN = '/define CHOLMOD_SCALAR/, /\*\) ;/'
  561. +_sdmult.tex: PATTERN = '/int cholmod_sdmult/, /\*\) ;/'
  562. +_ssmult.tex: PATTERN = '/cholmod_sparse \*cholmod_ssmult/, /\*\) ;/'
  563. +_submatrix.tex: PATTERN = '/cholmod_sparse \*cholmod_submatrix/, /\*\) ;/'
  564. +_vertcat.tex: PATTERN = '/cholmod_sparse \*cholmod_vertcat/, /\*\) ;/'
  565. +_symmetry.tex: PATTERN = '/int cholmod_symmetry/, /\*\) ;/'
  566. +
  567. +$(PROTO_MATRIXOPS): $(top_srcdir)/Include/cholmod_matrixops.h header.tex rule.awk footer.tex
  568. + $(getproto)
  569. +
  570. +PROTO_SUPERNODAL = \
  571. + _super_symbolic.tex \
  572. + _super_numeric.tex \
  573. + _super_lsolve.tex \
  574. + _super_ltsolve.tex
  575. +
  576. +_super_symbolic.tex: PATTERN = '/int cholmod_super_symbolic/, /\*\) ;/'
  577. +_super_numeric.tex: PATTERN = '/int cholmod_super_numeric/, /\*\) ;/'
  578. +_super_lsolve.tex: PATTERN = '/int cholmod_super_lsolve/, /\*\) ;/'
  579. +_super_ltsolve.tex: PATTERN = '/int cholmod_super_ltsolve/, /\*\) ;/'
  580. +
  581. +$(PROTO_SUPERNODAL): $(top_srcdir)/Include/cholmod_supernodal.h header.tex rule.awk footer.tex
  582. + $(getproto)
  583. +
  584. +PROTO_PARTITION = \
  585. + _nested_dissection.tex \
  586. + _metis.tex \
  587. + _ccolamd.tex \
  588. + _camd.tex \
  589. + _csymamd.tex \
  590. + _bisect.tex \
  591. + _metis_bisector.tex \
  592. + _collapse_septree.tex
  593. +
  594. +_nested_dissection.tex: PATTERN = '/long cholmod_nested_dissection/, /\*\) ;/'
  595. +_metis.tex: PATTERN = '/int cholmod_metis/, /\*\) ;/'
  596. +_ccolamd.tex: PATTERN = '/int cholmod_ccolamd/, /\*\) ;/'
  597. +_camd.tex: PATTERN = '/int cholmod_camd/, /\*\) ;/'
  598. +_csymamd.tex: PATTERN = '/int cholmod_csymamd/, /\*\) ;/'
  599. +_bisect.tex: PATTERN = '/long cholmod_bisect/, /\*\) ;/'
  600. +_metis_bisector.tex: PATTERN = '/long cholmod_metis_bisector/, /\*\) ;/'
  601. +_collapse_septree.tex: PATTERN = '/long cholmod_collapse_septree/, /\*\) ;/'
  602. +
  603. +$(PROTO_PARTITION): $(top_srcdir)/Include/cholmod_partition.h header.tex rule.awk footer.tex
  604. + $(getproto)
  605. +
  606. +PROTO = \
  607. + $(PROTO_M) \
  608. + $(PROTO_SIMPLE) \
  609. + $(PROTO_CORE) \
  610. + $(PROTO_CHECK) \
  611. + $(PROTO_CHOLESKY) \
  612. + $(PROTO_MODIFY) \
  613. + $(PROTO_MATRIXOPS) \
  614. + $(PROTO_SUPERNODAL) \
  615. + $(PROTO_PARTITION)
  616. +
  617. +UserGuide.pdf UserGuide.aux: $(PROTO)
  618. +.INTERMEDIATE: UserGuide.aux $(PROTO)
  619. +
  620. +TEX = TEXINPUTS="$(srcdir):" pdflatex -interaction nonstopmode -file-line-error
  621. +BIB = BIBINPUTS="$(srcdir):" bibtex
  622. +%.pdf: %.tex %.bbl
  623. + $(TEX) $*
  624. + while grep -q "Rerun to get cross-references right" $*.log; do \
  625. + $(TEX) $*; \
  626. + done
  627. +%.bbl: %.aux %.bib
  628. + $(BIB) $*
  629. +%.aux: %.tex
  630. + $(TEX) $*
  631. +
  632. +CLEANFILES = _*.awk _*.tex *.dvi *.aux *.log *.lof *.lot *.toc *.bak *.bbl *.blg
  633. +MAINTAINERCLEANFILES = $(dist_pdf_DATA)
  634. diff --git a/GPU/Makefile.am b/GPU/Makefile.am
  635. new file mode 100644
  636. --- /dev/null
  637. +++ b/GPU/Makefile.am
  638. @@ -0,0 +1,25 @@
  639. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  640. +
  641. +GPUSRC = \
  642. + cholmod_gpu.c
  643. +
  644. +EXTRA_DIST = \
  645. + cholmod_gpu_kernels.c \
  646. + cholmod_gpu_kernels.cu
  647. +
  648. +noinst_HEADERS = \
  649. + t_cholmod_gpu.c
  650. +
  651. +noinst_LTLIBRARIES = \
  652. + libgpui.la \
  653. + libgpul.la \
  654. + libgpu.la
  655. +
  656. +libgpui_la_SOURCES = $(GPUSRC)
  657. +libgpui_la_CPPFLAGS = $(AM_CPPFLAGS)
  658. +
  659. +libgpul_la_SOURCES = $(GPUSRC)
  660. +libgpul_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  661. +
  662. +libgpu_la_SOURCES =
  663. +libgpu_la_LIBADD = libgpui.la libgpul.la
  664. diff --git a/Include/Makefile.am b/Include/Makefile.am
  665. new file mode 100644
  666. --- /dev/null
  667. +++ b/Include/Makefile.am
  668. @@ -0,0 +1,45 @@
  669. +EXTRA_DIST = \
  670. + License.txt \
  671. + README.txt
  672. +
  673. +# Automatically generated headers
  674. +nodist_pkginclude_HEADERS = \
  675. + cholmod_config.h
  676. +
  677. +pkginclude_HEADERS = \
  678. + cholmod.h \
  679. + cholmod_blas.h \
  680. + cholmod_core.h \
  681. + cholmod_function.h \
  682. + cholmod_gpu.h \
  683. + cholmod_io64.h
  684. +
  685. +noinst_HEADERS = \
  686. + cholmod_complexity.h \
  687. + cholmod_gpu_kernels.h \
  688. + cholmod_internal.h \
  689. + cholmod_template.h
  690. +
  691. +if MOD_CHECK
  692. +pkginclude_HEADERS += cholmod_check.h
  693. +endif
  694. +
  695. +if MOD_CHOLESKY
  696. +pkginclude_HEADERS += cholmod_cholesky.h
  697. +endif
  698. +
  699. +if MOD_PARTITION
  700. +pkginclude_HEADERS += cholmod_camd.h cholmod_partition.h
  701. +endif
  702. +
  703. +if MOD_MATRIXOPS
  704. +pkginclude_HEADERS += cholmod_matrixops.h
  705. +endif
  706. +
  707. +if MOD_MODIFY
  708. +pkginclude_HEADERS += cholmod_modify.h
  709. +endif
  710. +
  711. +if MOD_SUPERNODAL
  712. +pkginclude_HEADERS += cholmod_supernodal.h
  713. +endif
  714. diff --git a/Include/cholmod_config.h b/Include/cholmod_config.h.in
  715. rename from Include/cholmod_config.h
  716. rename to Include/cholmod_config.h.in
  717. --- a/Include/cholmod_config.h
  718. +++ b/Include/cholmod_config.h.in
  719. @@ -54,17 +54,31 @@
  720. /* Use the compiler flag, or uncomment the definition(s), if you want to use
  721. * one or more non-default installation options: */
  722. -/*
  723. -#define NCHECK
  724. -#define NCHOLESKY
  725. -#define NCAMD
  726. -#define NPARTITION
  727. +/* Define to disable the Check module */
  728. +#undef NCHECK
  729. -#define NGPL
  730. -#define NMATRIXOPS
  731. -#define NMODIFY
  732. -#define NSUPERNODAL
  733. +/* Define to disable the Cholesky module */
  734. +#undef NCHOLESKY
  735. +
  736. +/* Define to disable the Partition module */
  737. +#undef NCAMD
  738. +
  739. +/* Define to disable metis support in the Partition module */
  740. +#undef NPARTITION
  741. +/* Define to disable GPL-licensed modules */
  742. +#undef NGPL
  743. +
  744. +/* Define to disable the MatrixOps module */
  745. +#undef NMATRIXOPS
  746. +
  747. +/* Define to disable the Modify module */
  748. +#undef NMODIFY
  749. +
  750. +/* Define to disable the Supernodal module */
  751. +#undef NSUPERNODAL
  752. +
  753. +/*
  754. #define NPRINT
  755. #define LONGBLAS long
  756. diff --git a/MATLAB/Makefile.am b/MATLAB/Makefile.am
  757. new file mode 100644
  758. --- /dev/null
  759. +++ b/MATLAB/Makefile.am
  760. @@ -0,0 +1,26 @@
  761. +# Needed by Doc/Makefile.am
  762. +EXTRA_DIST = \
  763. + analyze.m \
  764. + bisect.m \
  765. + chol2.m \
  766. + cholmod2.m \
  767. + cholmod_demo.m \
  768. + cholmod_make.m \
  769. + etree2.m \
  770. + graph_demo.m \
  771. + lchol.m \
  772. + ldl_normest.m \
  773. + ldlchol.m \
  774. + ldlsolve.m \
  775. + ldlsplit.m \
  776. + ldlupdate.m \
  777. + ldlrowmod.m \
  778. + metis.m \
  779. + mread.m \
  780. + mwrite.m \
  781. + nesdis.m \
  782. + resymbol.m \
  783. + sdmult.m \
  784. + sparse2.m \
  785. + spsym.m \
  786. + symbfact2.m
  787. diff --git a/Makefile.am b/Makefile.am
  788. new file mode 100644
  789. --- /dev/null
  790. +++ b/Makefile.am
  791. @@ -0,0 +1,46 @@
  792. +SUBDIRS = Include Core
  793. +EXTRA_DIST = README.txt
  794. +
  795. +pkgconfigdir = $(libdir)/pkgconfig
  796. +pkgconfig_DATA = cholmod.pc
  797. +
  798. +lib_LTLIBRARIES = libcholmod.la
  799. +
  800. +libcholmod_la_SOURCES =
  801. +libcholmod_la_LIBADD = $(top_builddir)/Core/libcore.la
  802. +libcholmod_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION)
  803. +
  804. +if MOD_CHECK
  805. +SUBDIRS += Check
  806. +libcholmod_la_LIBADD += $(top_builddir)/Check/libcheck.la
  807. +endif
  808. +
  809. +if MOD_CHOLESKY
  810. +SUBDIRS += Cholesky
  811. +libcholmod_la_LIBADD += $(top_builddir)/Cholesky/libcholesky.la
  812. +endif
  813. +
  814. +if MOD_PARTITION
  815. +SUBDIRS += Partition
  816. +libcholmod_la_LIBADD += $(top_builddir)/Partition/libpartition.la
  817. +endif
  818. +
  819. +if MOD_MATRIXOPS
  820. +SUBDIRS += MatrixOps
  821. +libcholmod_la_LIBADD += $(top_builddir)/MatrixOps/libmatrixops.la
  822. +endif
  823. +
  824. +if MOD_MODIFY
  825. +SUBDIRS += Modify
  826. +libcholmod_la_LIBADD += $(top_builddir)/Modify/libmodify.la
  827. +endif
  828. +
  829. +if MOD_SUPERNODAL
  830. +SUBDIRS += Supernodal
  831. +libcholmod_la_LIBADD += $(top_builddir)/Supernodal/libsupernodal.la
  832. +endif
  833. +
  834. +#SUBDIRS += GPU
  835. +#libcholmod_la_LIBADD += $(top_builddir)/GPU/libgpu.la
  836. +
  837. +SUBDIRS += MATLAB Demo Doc
  838. diff --git a/MatrixOps/Makefile.am b/MatrixOps/Makefile.am
  839. new file mode 100644
  840. --- /dev/null
  841. +++ b/MatrixOps/Makefile.am
  842. @@ -0,0 +1,35 @@
  843. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  844. +
  845. +EXTRA_DIST = \
  846. + License.txt \
  847. + gpl.txt
  848. +
  849. +MATRIXOPSSRC = \
  850. + cholmod_drop.c \
  851. + cholmod_horzcat.c \
  852. + cholmod_norm.c \
  853. + cholmod_scale.c \
  854. + cholmod_sdmult.c \
  855. + cholmod_ssmult.c \
  856. + cholmod_submatrix.c \
  857. + cholmod_symmetry.c \
  858. + cholmod_vertcat.c
  859. +
  860. +noinst_HEADERS = \
  861. + t_cholmod_sdmult.c
  862. +
  863. +noinst_LTLIBRARIES = \
  864. + libmatrixopsi.la \
  865. + libmatrixopsl.la \
  866. + libmatrixops.la
  867. +
  868. +libmatrixopsi_la_SOURCES = $(MATRIXOPSSRC)
  869. +libmatrixopsi_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm
  870. +libmatrixopsi_la_CPPFLAGS = $(AM_CPPFLAGS)
  871. +
  872. +libmatrixopsl_la_SOURCES = $(MATRIXOPSSRC)
  873. +libmatrixopsl_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm
  874. +libmatrixopsl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  875. +
  876. +libmatrixops_la_SOURCES =
  877. +libmatrixops_la_LIBADD = libmatrixopsi.la libmatrixopsl.la
  878. diff --git a/Modify/Makefile.am b/Modify/Makefile.am
  879. new file mode 100644
  880. --- /dev/null
  881. +++ b/Modify/Makefile.am
  882. @@ -0,0 +1,30 @@
  883. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  884. +
  885. +EXTRA_DIST = \
  886. + License.txt \
  887. + gpl.txt
  888. +
  889. +MODIFYSRC = \
  890. + cholmod_rowadd.c \
  891. + cholmod_rowdel.c \
  892. + cholmod_updown.c
  893. +
  894. +noinst_HEADERS = \
  895. + t_cholmod_updown.c \
  896. + t_cholmod_updown_numkr.c
  897. +
  898. +noinst_LTLIBRARIES = \
  899. + libmodifyi.la \
  900. + libmodifyl.la \
  901. + libmodify.la
  902. +
  903. +libmodifyi_la_SOURCES = $(MODIFYSRC)
  904. +libmodifyi_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm
  905. +libmodifyi_la_CPPFLAGS = $(AM_CPPFLAGS)
  906. +
  907. +libmodifyl_la_SOURCES = $(MODIFYSRC)
  908. +libmodifyl_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm
  909. +libmodifyl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  910. +
  911. +libmodify_la_SOURCES =
  912. +libmodify_la_LIBADD = libmodifyi.la libmodifyl.la
  913. diff --git a/Partition/Makefile.am b/Partition/Makefile.am
  914. new file mode 100644
  915. --- /dev/null
  916. +++ b/Partition/Makefile.am
  917. @@ -0,0 +1,28 @@
  918. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(METIS_CFLAGS) $(CCOLAMD_CFLAGS) $(CAMD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS)
  919. +
  920. +EXTRA_DIST = \
  921. + License.txt \
  922. + lesser.txt
  923. +
  924. +PARTITIONSRC = \
  925. + cholmod_camd.c \
  926. + cholmod_ccolamd.c \
  927. + cholmod_csymamd.c \
  928. + cholmod_metis.c \
  929. + cholmod_nesdis.c
  930. +
  931. +noinst_LTLIBRARIES = \
  932. + libpartitioni.la \
  933. + libpartitionl.la \
  934. + libpartition.la
  935. +
  936. +libpartitioni_la_SOURCES = $(PARTITIONSRC)
  937. +libpartitioni_la_LIBADD = $(METIS_LIBS) $(CCOLAMD_LIBS) $(CAMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm
  938. +libpartitioni_la_CPPFLAGS = $(AM_CPPFLAGS)
  939. +
  940. +libpartitionl_la_SOURCES = $(PARTITIONSRC)
  941. +libpartitionl_la_LIBADD = $(METIS_LIBS) $(CCOLAMD_LIBS) $(CAMD_LIBS) $(SUITESPARSECONFIG_LIBS) -lm
  942. +libpartitionl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  943. +
  944. +libpartition_la_SOURCES =
  945. +libpartition_la_LIBADD = libpartitioni.la libpartitionl.la
  946. diff --git a/Partition/cholmod_camd.c b/Partition/cholmod_camd.c
  947. --- a/Partition/cholmod_camd.c
  948. +++ b/Partition/cholmod_camd.c
  949. @@ -32,6 +32,7 @@
  950. * Supports any xtype (pattern, real, complex, or zomplex)
  951. */
  952. +#include "cholmod_config.h"
  953. #ifndef NCAMD
  954. #include "cholmod_internal.h"
  955. diff --git a/Partition/cholmod_ccolamd.c b/Partition/cholmod_ccolamd.c
  956. --- a/Partition/cholmod_ccolamd.c
  957. +++ b/Partition/cholmod_ccolamd.c
  958. @@ -22,6 +22,7 @@
  959. * Supports any xtype (pattern, real, complex, or zomplex).
  960. */
  961. +#include "cholmod_config.h"
  962. #ifndef NCAMD
  963. #include "cholmod_internal.h"
  964. diff --git a/Partition/cholmod_csymamd.c b/Partition/cholmod_csymamd.c
  965. --- a/Partition/cholmod_csymamd.c
  966. +++ b/Partition/cholmod_csymamd.c
  967. @@ -21,6 +21,7 @@
  968. * Supports any xtype (pattern, real, complex, or zomplex).
  969. */
  970. +#include "cholmod_config.h"
  971. #ifndef NCAMD
  972. #include "cholmod_internal.h"
  973. diff --git a/Partition/cholmod_metis.c b/Partition/cholmod_metis.c
  974. --- a/Partition/cholmod_metis.c
  975. +++ b/Partition/cholmod_metis.c
  976. @@ -43,6 +43,7 @@
  977. * Supports any xtype (pattern, real, complex, or zomplex).
  978. */
  979. +#include "cholmod_config.h"
  980. #ifndef NPARTITION
  981. #include "cholmod_internal.h"
  982. diff --git a/Partition/cholmod_nesdis.c b/Partition/cholmod_nesdis.c
  983. --- a/Partition/cholmod_nesdis.c
  984. +++ b/Partition/cholmod_nesdis.c
  985. @@ -38,6 +38,7 @@
  986. * Supports any xtype (pattern, real, complex, or zomplex).
  987. */
  988. +#include "cholmod_config.h"
  989. #ifndef NPARTITION
  990. #include "cholmod_internal.h"
  991. diff --git a/Supernodal/Makefile.am b/Supernodal/Makefile.am
  992. new file mode 100644
  993. --- /dev/null
  994. +++ b/Supernodal/Makefile.am
  995. @@ -0,0 +1,35 @@
  996. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  997. +
  998. +EXTRA_DIST = \
  999. + License.txt \
  1000. + gpl.txt
  1001. +
  1002. +SUPERNODALSRC = \
  1003. + cholmod_super_numeric.c \
  1004. + cholmod_super_solve.c \
  1005. + cholmod_super_symbolic.c
  1006. +
  1007. +noinst_HEADERS = \
  1008. + t_cholmod_super_numeric.c \
  1009. + t_cholmod_super_solve.c
  1010. +
  1011. +noinst_LTLIBRARIES = \
  1012. + libsupernodali.la \
  1013. + libsupernodall.la \
  1014. + libsupernodal.la
  1015. +
  1016. +libsupernodali_la_SOURCES = $(SUPERNODALSRC)
  1017. +libsupernodali_la_LIBADD = $(LAPACK_LIBS) $(BLAS_LIBS) $(SUITESPARSECONFIG_LIBS)
  1018. +libsupernodali_la_CPPFLAGS = $(AM_CPPFLAGS)
  1019. +
  1020. +libsupernodall_la_SOURCES = $(SUPERNODALSRC)
  1021. +libsupernodall_la_LIBADD = $(LAPACK_LIBS) $(BLAS_LIBS) $(SUITESPARSECONFIG_LIBS)
  1022. +libsupernodall_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  1023. +
  1024. +if !TIMING
  1025. +libsupernodali_la_CPPFLAGS += -DNTIMER
  1026. +libsupernodall_la_CPPFLAGS += -DNTIMER
  1027. +endif
  1028. +
  1029. +libsupernodal_la_SOURCES =
  1030. +libsupernodal_la_LIBADD = libsupernodali.la libsupernodall.la
  1031. diff --git a/ax_blas.m4 b/ax_blas.m4
  1032. new file mode 100644
  1033. --- /dev/null
  1034. +++ b/ax_blas.m4
  1035. @@ -0,0 +1,238 @@
  1036. +# ===========================================================================
  1037. +# http://www.gnu.org/software/autoconf-archive/ax_blas.html
  1038. +# ===========================================================================
  1039. +#
  1040. +# SYNOPSIS
  1041. +#
  1042. +# AX_BLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
  1043. +#
  1044. +# DESCRIPTION
  1045. +#
  1046. +# This macro looks for a library that implements the BLAS linear-algebra
  1047. +# interface (see http://www.netlib.org/blas/). On success, it sets the
  1048. +# BLAS_LIBS output variable to hold the requisite library linkages.
  1049. +#
  1050. +# To link with BLAS, you should link with:
  1051. +#
  1052. +# $BLAS_LIBS $LIBS $FLIBS
  1053. +#
  1054. +# in that order. FLIBS is the output variable of the
  1055. +# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by AX_BLAS), and is
  1056. +# sometimes necessary in order to link with F77 libraries. Users will also
  1057. +# need to use AC_F77_DUMMY_MAIN (see the autoconf manual), for the same
  1058. +# reason.
  1059. +#
  1060. +# Many libraries are searched for, from ATLAS to CXML to ESSL. The user
  1061. +# may also use --with-blas=<lib> in order to use some specific BLAS
  1062. +# library <lib>. In order to link successfully, however, be aware that you
  1063. +# will probably need to use the same Fortran compiler (which can be set
  1064. +# via the F77 env. var.) as was used to compile the BLAS library.
  1065. +#
  1066. +# ACTION-IF-FOUND is a list of shell commands to run if a BLAS library is
  1067. +# found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is
  1068. +# not found. If ACTION-IF-FOUND is not specified, the default action will
  1069. +# define HAVE_BLAS.
  1070. +#
  1071. +# LICENSE
  1072. +#
  1073. +# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
  1074. +#
  1075. +# This program is free software: you can redistribute it and/or modify it
  1076. +# under the terms of the GNU General Public License as published by the
  1077. +# Free Software Foundation, either version 3 of the License, or (at your
  1078. +# option) any later version.
  1079. +#
  1080. +# This program is distributed in the hope that it will be useful, but
  1081. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  1082. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  1083. +# Public License for more details.
  1084. +#
  1085. +# You should have received a copy of the GNU General Public License along
  1086. +# with this program. If not, see <http://www.gnu.org/licenses/>.
  1087. +#
  1088. +# As a special exception, the respective Autoconf Macro's copyright owner
  1089. +# gives unlimited permission to copy, distribute and modify the configure
  1090. +# scripts that are the output of Autoconf when processing the Macro. You
  1091. +# need not follow the terms of the GNU General Public License when using
  1092. +# or distributing such scripts, even though portions of the text of the
  1093. +# Macro appear in them. The GNU General Public License (GPL) does govern
  1094. +# all other use of the material that constitutes the Autoconf Macro.
  1095. +#
  1096. +# This special exception to the GPL applies to versions of the Autoconf
  1097. +# Macro released by the Autoconf Archive. When you make and distribute a
  1098. +# modified version of the Autoconf Macro, you may extend this special
  1099. +# exception to the GPL to apply to your modified version as well.
  1100. +
  1101. +#serial 14
  1102. +
  1103. +AU_ALIAS([ACX_BLAS], [AX_BLAS])
  1104. +AC_DEFUN([AX_BLAS], [
  1105. +AC_PREREQ(2.50)
  1106. +AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
  1107. +AC_REQUIRE([AC_CANONICAL_HOST])
  1108. +ax_blas_ok=no
  1109. +
  1110. +AC_ARG_WITH(blas,
  1111. + [AS_HELP_STRING([--with-blas=<lib>], [use BLAS library <lib>])])
  1112. +case $with_blas in
  1113. + yes | "") ;;
  1114. + no) ax_blas_ok=disable ;;
  1115. + -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;;
  1116. + *) BLAS_LIBS="-l$with_blas" ;;
  1117. +esac
  1118. +
  1119. +# Get fortran linker names of BLAS functions to check for.
  1120. +AC_F77_FUNC(sgemm)
  1121. +AC_F77_FUNC(dgemm)
  1122. +
  1123. +ax_blas_save_LIBS="$LIBS"
  1124. +LIBS="$LIBS $FLIBS"
  1125. +
  1126. +# First, check BLAS_LIBS environment variable
  1127. +if test $ax_blas_ok = no; then
  1128. +if test "x$BLAS_LIBS" != x; then
  1129. + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
  1130. + AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS])
  1131. + AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes], [BLAS_LIBS=""])
  1132. + AC_MSG_RESULT($ax_blas_ok)
  1133. + LIBS="$save_LIBS"
  1134. +fi
  1135. +fi
  1136. +
  1137. +# BLAS linked to by default? (happens on some supercomputers)
  1138. +if test $ax_blas_ok = no; then
  1139. + save_LIBS="$LIBS"; LIBS="$LIBS"
  1140. + AC_MSG_CHECKING([if $sgemm is being linked in already])
  1141. + AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes])
  1142. + AC_MSG_RESULT($ax_blas_ok)
  1143. + LIBS="$save_LIBS"
  1144. +fi
  1145. +
  1146. +# BLAS in OpenBLAS library? (http://xianyi.github.com/OpenBLAS/)
  1147. +if test $ax_blas_ok = no; then
  1148. + AC_CHECK_LIB(openblas, $sgemm, [ax_blas_ok=yes
  1149. + BLAS_LIBS="-lopenblas"])
  1150. +fi
  1151. +
  1152. +# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
  1153. +if test $ax_blas_ok = no; then
  1154. + AC_CHECK_LIB(atlas, ATL_xerbla,
  1155. + [AC_CHECK_LIB(f77blas, $sgemm,
  1156. + [AC_CHECK_LIB(cblas, cblas_dgemm,
  1157. + [ax_blas_ok=yes
  1158. + BLAS_LIBS="-lcblas -lf77blas -latlas"],
  1159. + [], [-lf77blas -latlas])],
  1160. + [], [-latlas])])
  1161. +fi
  1162. +
  1163. +# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
  1164. +if test $ax_blas_ok = no; then
  1165. + AC_CHECK_LIB(blas, $sgemm,
  1166. + [AC_CHECK_LIB(dgemm, $dgemm,
  1167. + [AC_CHECK_LIB(sgemm, $sgemm,
  1168. + [ax_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"],
  1169. + [], [-lblas])],
  1170. + [], [-lblas])])
  1171. +fi
  1172. +
  1173. +# BLAS in Intel MKL library?
  1174. +if test $ax_blas_ok = no; then
  1175. + # MKL for gfortran
  1176. + if test x"$ac_cv_fc_compiler_gnu" = xyes; then
  1177. + # 64 bit
  1178. + if test $host_cpu = x86_64; then
  1179. + AC_CHECK_LIB(mkl_gf_lp64, $sgemm,
  1180. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread"],,
  1181. + [-lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread])
  1182. + # 32 bit
  1183. + elif test $host_cpu = i686; then
  1184. + AC_CHECK_LIB(mkl_gf, $sgemm,
  1185. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_gf -lmkl_sequential -lmkl_core -lpthread"],,
  1186. + [-lmkl_gf -lmkl_sequential -lmkl_core -lpthread])
  1187. + fi
  1188. + # MKL for other compilers (Intel, PGI, ...?)
  1189. + else
  1190. + # 64-bit
  1191. + if test $host_cpu = x86_64; then
  1192. + AC_CHECK_LIB(mkl_intel_lp64, $sgemm,
  1193. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread"],,
  1194. + [-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread])
  1195. + # 32-bit
  1196. + elif test $host_cpu = i686; then
  1197. + AC_CHECK_LIB(mkl_intel, $sgemm,
  1198. + [ax_blas_ok=yes;BLAS_LIBS="-lmkl_intel -lmkl_sequential -lmkl_core -lpthread"],,
  1199. + [-lmkl_intel -lmkl_sequential -lmkl_core -lpthread])
  1200. + fi
  1201. + fi
  1202. +fi
  1203. +# Old versions of MKL
  1204. +if test $ax_blas_ok = no; then
  1205. + AC_CHECK_LIB(mkl, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lmkl -lguide -lpthread"],,[-lguide -lpthread])
  1206. +fi
  1207. +
  1208. +# BLAS in Apple vecLib library?
  1209. +if test $ax_blas_ok = no; then
  1210. + save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS"
  1211. + AC_MSG_CHECKING([for $sgemm in -framework vecLib])
  1212. + AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes;BLAS_LIBS="-framework vecLib"])
  1213. + AC_MSG_RESULT($ax_blas_ok)
  1214. + LIBS="$save_LIBS"
  1215. +fi
  1216. +
  1217. +# BLAS in Alpha CXML library?
  1218. +if test $ax_blas_ok = no; then
  1219. + AC_CHECK_LIB(cxml, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-lcxml"])
  1220. +fi
  1221. +
  1222. +# BLAS in Alpha DXML library? (now called CXML, see above)
  1223. +if test $ax_blas_ok = no; then
  1224. + AC_CHECK_LIB(dxml, $sgemm, [ax_blas_ok=yes;BLAS_LIBS="-ldxml"])
  1225. +fi
  1226. +
  1227. +# BLAS in Sun Performance library?
  1228. +if test $ax_blas_ok = no; then
  1229. + if test "x$GCC" != xyes; then # only works with Sun CC
  1230. + AC_CHECK_LIB(sunmath, acosp,
  1231. + [AC_CHECK_LIB(sunperf, $sgemm,
  1232. + [BLAS_LIBS="-xlic_lib=sunperf -lsunmath"
  1233. + ax_blas_ok=yes],[],[-lsunmath])])
  1234. + fi
  1235. +fi
  1236. +
  1237. +# BLAS in SCSL library? (SGI/Cray Scientific Library)
  1238. +if test $ax_blas_ok = no; then
  1239. + AC_CHECK_LIB(scs, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lscs"])
  1240. +fi
  1241. +
  1242. +# BLAS in SGIMATH library?
  1243. +if test $ax_blas_ok = no; then
  1244. + AC_CHECK_LIB(complib.sgimath, $sgemm,
  1245. + [ax_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"])
  1246. +fi
  1247. +
  1248. +# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
  1249. +if test $ax_blas_ok = no; then
  1250. + AC_CHECK_LIB(blas, $sgemm,
  1251. + [AC_CHECK_LIB(essl, $sgemm,
  1252. + [ax_blas_ok=yes; BLAS_LIBS="-lessl -lblas"],
  1253. + [], [-lblas $FLIBS])])
  1254. +fi
  1255. +
  1256. +# Generic BLAS library?
  1257. +if test $ax_blas_ok = no; then
  1258. + AC_CHECK_LIB(blas, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lblas"])
  1259. +fi
  1260. +
  1261. +AC_SUBST(BLAS_LIBS)
  1262. +
  1263. +LIBS="$ax_blas_save_LIBS"
  1264. +
  1265. +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
  1266. +if test x"$ax_blas_ok" = xyes; then
  1267. + ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1])
  1268. + :
  1269. +else
  1270. + ax_blas_ok=no
  1271. + $2
  1272. +fi
  1273. +])dnl AX_BLAS
  1274. diff --git a/ax_lapack.m4 b/ax_lapack.m4
  1275. new file mode 100644
  1276. --- /dev/null
  1277. +++ b/ax_lapack.m4
  1278. @@ -0,0 +1,131 @@
  1279. +# ===========================================================================
  1280. +# http://www.gnu.org/software/autoconf-archive/ax_lapack.html
  1281. +# ===========================================================================
  1282. +#
  1283. +# SYNOPSIS
  1284. +#
  1285. +# AX_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
  1286. +#
  1287. +# DESCRIPTION
  1288. +#
  1289. +# This macro looks for a library that implements the LAPACK linear-algebra
  1290. +# interface (see http://www.netlib.org/lapack/). On success, it sets the
  1291. +# LAPACK_LIBS output variable to hold the requisite library linkages.
  1292. +#
  1293. +# To link with LAPACK, you should link with:
  1294. +#
  1295. +# $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS
  1296. +#
  1297. +# in that order. BLAS_LIBS is the output variable of the AX_BLAS macro,
  1298. +# called automatically. FLIBS is the output variable of the
  1299. +# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by AX_BLAS), and is
  1300. +# sometimes necessary in order to link with F77 libraries. Users will also
  1301. +# need to use AC_F77_DUMMY_MAIN (see the autoconf manual), for the same
  1302. +# reason.
  1303. +#
  1304. +# The user may also use --with-lapack=<lib> in order to use some specific
  1305. +# LAPACK library <lib>. In order to link successfully, however, be aware
  1306. +# that you will probably need to use the same Fortran compiler (which can
  1307. +# be set via the F77 env. var.) as was used to compile the LAPACK and BLAS
  1308. +# libraries.
  1309. +#
  1310. +# ACTION-IF-FOUND is a list of shell commands to run if a LAPACK library
  1311. +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
  1312. +# is not found. If ACTION-IF-FOUND is not specified, the default action
  1313. +# will define HAVE_LAPACK.
  1314. +#
  1315. +# LICENSE
  1316. +#
  1317. +# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
  1318. +#
  1319. +# This program is free software: you can redistribute it and/or modify it
  1320. +# under the terms of the GNU General Public License as published by the
  1321. +# Free Software Foundation, either version 3 of the License, or (at your
  1322. +# option) any later version.
  1323. +#
  1324. +# This program is distributed in the hope that it will be useful, but
  1325. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  1326. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  1327. +# Public License for more details.
  1328. +#
  1329. +# You should have received a copy of the GNU General Public License along
  1330. +# with this program. If not, see <http://www.gnu.org/licenses/>.
  1331. +#
  1332. +# As a special exception, the respective Autoconf Macro's copyright owner
  1333. +# gives unlimited permission to copy, distribute and modify the configure
  1334. +# scripts that are the output of Autoconf when processing the Macro. You
  1335. +# need not follow the terms of the GNU General Public License when using
  1336. +# or distributing such scripts, even though portions of the text of the
  1337. +# Macro appear in them. The GNU General Public License (GPL) does govern
  1338. +# all other use of the material that constitutes the Autoconf Macro.
  1339. +#
  1340. +# This special exception to the GPL applies to versions of the Autoconf
  1341. +# Macro released by the Autoconf Archive. When you make and distribute a
  1342. +# modified version of the Autoconf Macro, you may extend this special
  1343. +# exception to the GPL to apply to your modified version as well.
  1344. +
  1345. +#serial 7
  1346. +
  1347. +AU_ALIAS([ACX_LAPACK], [AX_LAPACK])
  1348. +AC_DEFUN([AX_LAPACK], [
  1349. +AC_REQUIRE([AX_BLAS])
  1350. +ax_lapack_ok=no
  1351. +
  1352. +AC_ARG_WITH(lapack,
  1353. + [AS_HELP_STRING([--with-lapack=<lib>], [use LAPACK library <lib>])])
  1354. +case $with_lapack in
  1355. + yes | "") ;;
  1356. + no) ax_lapack_ok=disable ;;
  1357. + -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;;
  1358. + *) LAPACK_LIBS="-l$with_lapack" ;;
  1359. +esac
  1360. +
  1361. +# Get fortran linker name of LAPACK function to check for.
  1362. +AC_F77_FUNC(cheev)
  1363. +
  1364. +# We cannot use LAPACK if BLAS is not found
  1365. +if test "x$ax_blas_ok" != xyes; then
  1366. + ax_lapack_ok=noblas
  1367. + LAPACK_LIBS=""
  1368. +fi
  1369. +
  1370. +# First, check LAPACK_LIBS environment variable
  1371. +if test "x$LAPACK_LIBS" != x; then
  1372. + save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"
  1373. + AC_MSG_CHECKING([for $cheev in $LAPACK_LIBS])
  1374. + AC_TRY_LINK_FUNC($cheev, [ax_lapack_ok=yes], [LAPACK_LIBS=""])
  1375. + AC_MSG_RESULT($ax_lapack_ok)
  1376. + LIBS="$save_LIBS"
  1377. + if test $ax_lapack_ok = no; then
  1378. + LAPACK_LIBS=""
  1379. + fi
  1380. +fi
  1381. +
  1382. +# LAPACK linked to by default? (is sometimes included in BLAS lib)
  1383. +if test $ax_lapack_ok = no; then
  1384. + save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS"
  1385. + AC_CHECK_FUNC($cheev, [ax_lapack_ok=yes])
  1386. + LIBS="$save_LIBS"
  1387. +fi
  1388. +
  1389. +# Generic LAPACK library?
  1390. +for lapack in lapack lapack_rs6k; do
  1391. + if test $ax_lapack_ok = no; then
  1392. + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
  1393. + AC_CHECK_LIB($lapack, $cheev,
  1394. + [ax_lapack_ok=yes; LAPACK_LIBS="-l$lapack"], [], [$FLIBS])
  1395. + LIBS="$save_LIBS"
  1396. + fi
  1397. +done
  1398. +
  1399. +AC_SUBST(LAPACK_LIBS)
  1400. +
  1401. +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
  1402. +if test x"$ax_lapack_ok" = xyes; then
  1403. + ifelse([$1],,AC_DEFINE(HAVE_LAPACK,1,[Define if you have LAPACK library.]),[$1])
  1404. + :
  1405. +else
  1406. + ax_lapack_ok=no
  1407. + $2
  1408. +fi
  1409. +])dnl AX_LAPACK
  1410. diff --git a/cholmod.pc.in b/cholmod.pc.in
  1411. new file mode 100644
  1412. --- /dev/null
  1413. +++ b/cholmod.pc.in
  1414. @@ -0,0 +1,13 @@
  1415. +prefix=@prefix@
  1416. +exec_prefix=@exec_prefix@
  1417. +libdir=@libdir@
  1418. +includedir=@includedir@
  1419. +
  1420. +Name: @PACKAGE_NAME@
  1421. +Description: Sparse Cholesky factorization
  1422. +Version: @PACKAGE_VERSION@
  1423. +URL: @PACKAGE_URL@
  1424. +Requires.private: @CHOLMOD_REQUIRES@
  1425. +Libs: -L${libdir} -lcholmod
  1426. +Libs.private: @LAPACK_LIBS@ @BLAS_LIBS@ -lm
  1427. +Cflags: -I${includedir}/cholmod
  1428. diff --git a/configure.ac b/configure.ac
  1429. new file mode 100644
  1430. --- /dev/null
  1431. +++ b/configure.ac
  1432. @@ -0,0 +1,216 @@
  1433. +# -*- Autoconf -*-
  1434. +# Process this file with autoconf to produce a configure script.
  1435. +
  1436. +AC_PREREQ([2.69])
  1437. +AC_INIT([CHOLMOD],[3.0.6],[DrTimothyAldenDavis@gmail.com],[cholmod],[http://www.suitesparse.com/])
  1438. +AC_CONFIG_SRCDIR([Core/cholmod_common.c])
  1439. +AC_CONFIG_HEADERS([config.h Include/cholmod_config.h])
  1440. +AM_INIT_AUTOMAKE([foreign])
  1441. +LT_INIT
  1442. +
  1443. +# Checks for programs.
  1444. +AC_PROG_INSTALL
  1445. +AC_PROG_CC
  1446. +AC_PROG_F77
  1447. +AC_PROG_AWK
  1448. +
  1449. +AC_MSG_CHECKING([whether to build GPL-licensed modules])
  1450. +AC_ARG_ENABLE([gpl-modules],
  1451. + [AS_HELP_STRING(
  1452. + [--disable-gpl-modules],
  1453. + [do not build GPL-licensed modules])],
  1454. + [mod_gpl=$enableval],
  1455. + [mod_gpl="yes"])
  1456. +AC_MSG_RESULT([$mod_gpl])
  1457. +
  1458. +AC_MSG_CHECKING([whether to build mod-check])
  1459. +AC_ARG_ENABLE([mod-check],
  1460. + [AS_HELP_STRING(
  1461. + [--disable-mod-check],
  1462. + [do not build the Check module])],
  1463. + [mod_check=$enableval],
  1464. + [mod_check="yes"])
  1465. +AC_MSG_RESULT([$mod_check])
  1466. +
  1467. +AC_MSG_CHECKING([whether to build mod-cholesky])
  1468. +AC_ARG_ENABLE([mod-cholesky],
  1469. + [AS_HELP_STRING(
  1470. + [--disable-mod-cholesky],
  1471. + [do not build the Cholesky module])],
  1472. + [mod_cholesky=$enableval],
  1473. + [mod_cholesky="yes"])
  1474. +AC_MSG_RESULT([$mod_cholesky])
  1475. +
  1476. +AC_MSG_CHECKING([whether to build mod-partition])
  1477. +AC_ARG_ENABLE([mod-partition],
  1478. + [AS_HELP_STRING(
  1479. + [--disable-mod-partition],
  1480. + [do not build the Partition module])],
  1481. + [mod_partition=$enableval],
  1482. + [mod_partition="yes"])
  1483. +AC_MSG_RESULT([$mod_partition])
  1484. +
  1485. +AC_MSG_CHECKING([whether to build mod-matrixops])
  1486. +AC_ARG_ENABLE([mod-matrixops],
  1487. + [AS_HELP_STRING(
  1488. + [--disable-mod-matrixops],
  1489. + [do not build the MatrixOps module])],
  1490. + [mod_matrixops=$enableval],
  1491. + [mod_matrixops=$mod_gpl])
  1492. +AC_MSG_RESULT([$mod_matrixops])
  1493. +
  1494. +AC_MSG_CHECKING([whether to build mod-modify])
  1495. +AC_ARG_ENABLE([mod-modify],
  1496. + [AS_HELP_STRING(
  1497. + [--disable-mod-modify],
  1498. + [do not build the Modify module])],
  1499. + [mod_modify=$enableval],
  1500. + [mod_modify=$mod_gpl])
  1501. +AC_MSG_RESULT([$mod_modify])
  1502. +
  1503. +AC_MSG_CHECKING([whether to build mod-supernodal])
  1504. +AC_ARG_ENABLE([mod-supernodal],
  1505. + [AS_HELP_STRING(
  1506. + [--disable-mod-supernodal],
  1507. + [do not build the Supernodal module])],
  1508. + [mod_supernodal=$enableval],
  1509. + [mod_supernodal=$mod_gpl])
  1510. +AC_MSG_RESULT([$mod_supernodal])
  1511. +
  1512. +AC_MSG_CHECKING([whether to use timing routines])
  1513. +AC_ARG_ENABLE([timing],
  1514. + [AS_HELP_STRING(
  1515. + [--disable-timing],
  1516. + [do not use timing routines])],
  1517. + [timing=$enableval],
  1518. + [timing="yes"])
  1519. +AC_MSG_RESULT([$timing])
  1520. +
  1521. +LIBS_SAVED=$LIBS
  1522. +
  1523. +# Checks for libraries.
  1524. +AC_CHECK_LIB([m], [sqrt])
  1525. +
  1526. +PKG_PROG_PKG_CONFIG
  1527. +PKG_CHECK_MODULES([SUITESPARSECONFIG],[suitesparseconfig],
  1528. + [],
  1529. + [AC_MSG_ERROR([cannot find suitesparseconfig])])
  1530. +CHOLMOD_REQUIRES="suitesparseconfig"
  1531. +
  1532. +if test "x$mod_cholesky" = "xyes"; then
  1533. + PKG_CHECK_MODULES([AMD],[amd],
  1534. + [],
  1535. + [AC_MSG_ERROR([cannot find amd (required by mod-cholesky)])])
  1536. + CHOLMOD_REQUIRES="$CHOLMOD_REQUIRES amd"
  1537. +
  1538. + PKG_CHECK_MODULES([COLAMD],[colamd],
  1539. + [],
  1540. + [AC_MSG_ERROR([cannot find colamd (required by mod-cholesky)])])
  1541. + CHOLMOD_REQUIRES="$CHOLMOD_REQUIRES colamd"
  1542. +fi
  1543. +
  1544. +if test "x$mod_partition" = "xyes"; then
  1545. + PKG_CHECK_MODULES([CAMD],[camd],
  1546. + [],
  1547. + [AC_MSG_ERROR([cannot find camd (required by mod-partition)])])
  1548. + CHOLMOD_REQUIRES="$CHOLMOD_REQUIRES camd"
  1549. +
  1550. + PKG_CHECK_MODULES([CCOLAMD],[ccolamd],
  1551. + [],
  1552. + [AC_MSG_ERROR([cannot find ccolamd (required by mod-partition)])])
  1553. + CHOLMOD_REQUIRES="$CHOLMOD_REQUIRES ccolamd"
  1554. +
  1555. + PKG_CHECK_MODULES([METIS],[metis],
  1556. + [metis="yes"],
  1557. + [metis="no"])
  1558. + if test "x$metis" = "xyes"; then
  1559. + CHOLMOD_REQUIRES="$CHOLMOD_REQUIRES metis"
  1560. + else
  1561. + AC_MSG_WARN([cannot find metis (used by mod-partition), disabling some functionality])
  1562. + fi
  1563. +fi
  1564. +
  1565. +if test "x$mod_supernodal" = "xyes"; then
  1566. + sinclude([ax_blas.m4])
  1567. + AX_BLAS
  1568. + if test "x$ax_blas_ok" != "xyes"; then
  1569. + AC_MSG_ERROR([cannot find blas (required by mod-supernodal)])
  1570. + fi
  1571. +
  1572. + sinclude([ax_lapack.m4])
  1573. + AX_LAPACK
  1574. + if test "x$ax_lapack_ok" != "xyes"; then
  1575. + AC_MSG_ERROR([cannot find lapack (required by mod-supernodal)])
  1576. + fi
  1577. +fi
  1578. +
  1579. +# Checks for header files.
  1580. +AC_CHECK_HEADERS([float.h limits.h stddef.h stdlib.h string.h])
  1581. +
  1582. +# Checks for typedefs, structures, and compiler characteristics.
  1583. +AC_TYPE_SIZE_T
  1584. +
  1585. +# Checks for library functions.
  1586. +AC_FUNC_MALLOC
  1587. +AC_CHECK_FUNCS([sqrt])
  1588. +
  1589. +LIBS=$LIBS_SAVED
  1590. +
  1591. +if test "x$mod_check" != "xyes"; then
  1592. + AC_DEFINE([NCHECK], [], [Define to disable the Check module])
  1593. +fi
  1594. +
  1595. +if test "x$mod_cholesky" != "xyes"; then
  1596. + AC_DEFINE([NCHOLESKY], [], [Define to disable the Cholesky module])
  1597. +fi
  1598. +
  1599. +if test "x$mod_partition" != "xyes"; then
  1600. + AC_DEFINE([NCAMD], [], [Define to disable the Partition module])
  1601. +fi
  1602. +
  1603. +if test "x$metis" != "xyes"; then
  1604. + AC_DEFINE([NPARTITION], [], [Define to disable metis support in the Partition module])
  1605. +fi
  1606. +
  1607. +if test "x$mod_gpl" != "xyes"; then
  1608. + AC_DEFINE([NGPL], [], [Define to disable GPL-licensed modules])
  1609. +fi
  1610. +
  1611. +if test "x$mod_matrixops" != "xyes"; then
  1612. + AC_DEFINE([NMATRIXOPS], [], [Define to disable the MatrixOps module])
  1613. +fi
  1614. +
  1615. +if test "x$mod_modify" != "xyes"; then
  1616. + AC_DEFINE([NMODIFY], [], [Define to disable the Modify module])
  1617. +fi
  1618. +
  1619. +if test "x$mod_supernodal" != "xyes"; then
  1620. + AC_DEFINE([NSUPERNODAL], [], [Define to disable the Supernodal module])
  1621. +fi
  1622. +
  1623. +AM_CONDITIONAL([MOD_CHECK], [test "x$mod_check" = "xyes"])
  1624. +AM_CONDITIONAL([MOD_CHOLESKY], [test "x$mod_cholesky" = "xyes"])
  1625. +AM_CONDITIONAL([MOD_PARTITION], [test "x$mod_partition" = "xyes"])
  1626. +AM_CONDITIONAL([MOD_MATRIXOPS], [test "x$mod_matrixops" = "xyes"])
  1627. +AM_CONDITIONAL([MOD_MODIFY], [test "x$mod_modify" = "xyes"])
  1628. +AM_CONDITIONAL([MOD_SUPERNODAL], [test "x$mod_supernodal" = "xyes"])
  1629. +AM_CONDITIONAL([TIMING], [test "x$timing" = "xyes"])
  1630. +
  1631. +AC_SUBST([CHOLMOD_REQUIRES])
  1632. +
  1633. +AC_CONFIG_FILES([
  1634. + cholmod.pc
  1635. + Makefile
  1636. + Check/Makefile
  1637. + Cholesky/Makefile
  1638. + Core/Makefile
  1639. + Demo/Makefile
  1640. + Doc/Makefile
  1641. + GPU/Makefile
  1642. + Include/Makefile
  1643. + MATLAB/Makefile
  1644. + MatrixOps/Makefile
  1645. + Modify/Makefile
  1646. + Partition/Makefile
  1647. + Supernodal/Makefile])
  1648. +AC_OUTPUT