summaryrefslogtreecommitdiff
path: root/libraries/KLU/autotoolize.diff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/KLU/autotoolize.diff')
-rw-r--r--libraries/KLU/autotoolize.diff195
1 files changed, 109 insertions, 86 deletions
diff --git a/libraries/KLU/autotoolize.diff b/libraries/KLU/autotoolize.diff
index 690e34a9ed..a29a03a0ba 100644
--- a/libraries/KLU/autotoolize.diff
+++ b/libraries/KLU/autotoolize.diff
@@ -2,8 +2,8 @@ diff --git a/Demo/Makefile.am b/Demo/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Demo/Makefile.am
-@@ -0,0 +1,44 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(BTF_CFLAGS) $(COLAMD_CFLAGS) $(CHOLMOD_CFLAGS)
+@@ -0,0 +1,46 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS) $(CHOLMOD_CFLAGS)
+LDADD = $(top_builddir)/Source/libklu.la
+
+EXTRA_DIST = \
@@ -14,12 +14,13 @@ new file mode 100644
+# adding bogus dependencies for the .out files listed above.
+%.out: %
+
-+check_PROGRAMS = klu_simple kludemo kluldemo
-+
++check_PROGRAMS = klu_simple
+TESTS = klu_simple
-+
+klu_simple_SOURCES = klu_simple.c
+
++if CHOLMOD
++check_PROGRAMS += kludemo kluldemo
++
+kludemo_SOURCES = kludemo.c
+kludemo_LDADD = $(LDADD) $(CHOLMOD_LIBS) -lm
+
@@ -27,78 +28,85 @@ new file mode 100644
+kluldemo_LDADD = $(LDADD) $(CHOLMOD_LIBS) -lm
+
+MATRICES = \
-+ ../Matrix/1c.mtx \
-+ ../Matrix/arrowc.mtx \
-+ ../Matrix/arrow.mtx \
-+ ../Matrix/impcol_a.mtx \
-+ ../Matrix/w156.mtx \
-+ ../Matrix/ctina.mtx
++ $(top_srcdir)/Matrix/1c.mtx \
++ $(top_srcdir)/Matrix/arrowc.mtx \
++ $(top_srcdir)/Matrix/arrow.mtx \
++ $(top_srcdir)/Matrix/impcol_a.mtx \
++ $(top_srcdir)/Matrix/w156.mtx \
++ $(top_srcdir)/Matrix/ctina.mtx
+
+check-local: kludemo kluldemo $(MATRICES)
-+ -./kludemo < ../Matrix/1c.mtx
-+ -./kludemo < ../Matrix/arrowc.mtx
-+ -./kludemo < ../Matrix/arrow.mtx
-+ -./kludemo < ../Matrix/impcol_a.mtx
-+ -./kludemo < ../Matrix/w156.mtx
-+ -./kludemo < ../Matrix/ctina.mtx
-+ -./kluldemo < ../Matrix/1c.mtx
-+ -./kluldemo < ../Matrix/arrowc.mtx
-+ -./kluldemo < ../Matrix/arrow.mtx
-+ -./kluldemo < ../Matrix/impcol_a.mtx
-+ -./kluldemo < ../Matrix/w156.mtx
-+ -./kluldemo < ../Matrix/ctina.mtx
++ -./kludemo < $(top_srcdir)/Matrix/1c.mtx
++ -./kludemo < $(top_srcdir)/Matrix/arrowc.mtx
++ -./kludemo < $(top_srcdir)/Matrix/arrow.mtx
++ -./kludemo < $(top_srcdir)/Matrix/impcol_a.mtx
++ -./kludemo < $(top_srcdir)/Matrix/w156.mtx
++ -./kludemo < $(top_srcdir)/Matrix/ctina.mtx
++ -./kluldemo < $(top_srcdir)/Matrix/1c.mtx
++ -./kluldemo < $(top_srcdir)/Matrix/arrowc.mtx
++ -./kluldemo < $(top_srcdir)/Matrix/arrow.mtx
++ -./kluldemo < $(top_srcdir)/Matrix/impcol_a.mtx
++ -./kluldemo < $(top_srcdir)/Matrix/w156.mtx
++ -./kluldemo < $(top_srcdir)/Matrix/ctina.mtx
++endif
diff --git a/Doc/Makefile.am b/Doc/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Doc/Makefile.am
-@@ -0,0 +1,41 @@
-+# Generating KLU_UserGuide.pdf seems to be broken, so
-+# just distribute the copy that came in the tarball.
-+EXTRA_DIST = \
-+ ChangeLog \
-+ lesser.txt \
-+ palamadai_e.pdf \
-+ KLU_UserGuide.pdf
+@@ -0,0 +1,48 @@
++EXTRA_DIST = ChangeLog lesser.txt
+
+dist_noinst_DATA = KLU_UserGuide.tex KLU_UserGuide.bib
-+pdf_DATA = KLU_UserGuide.pdf palamadai_e.pdf
-+
-+#SRC = \
-+# klu_h.tex \
-+# btf_h.tex \
-+# klu_simple_c.tex
-+#
-+#klu_h.tex: ../Include/klu.h
-+# echo '\\begin{verbatim}' > $@
-+# expand -8 $< >> $@
-+# echo '\end{verbatim}' >> $@
-+#
-+## FIXME: Probably shouldn't rely on this location for btf.h.
++dist_pdf_DATA = KLU_UserGuide.pdf palamadai_e.pdf
++
++SRC = \
++ klu_h.tex \
++ btf_h.tex \
++ klu_simple_c.tex
++
++KLU_UserGuide.pdf KLU_UserGuide.aux: $(SRC)
++.INTERMEDIATE: KLU_UserGuide.aux $(SRC)
++
++define verbatim =
++echo '\begin{verbatim}' > $@
++expand -8 $< >> $@
++echo '\end{verbatim}' >> $@
++endef
++
++klu_h.tex: $(top_srcdir)/Include/klu.h
++ $(verbatim)
++
++# FIXME: We don't know the location of btf.h.
++# Insert a placeholder for now.
+#btf_h.tex: /usr/include/btf.h
-+# echo '\\begin{verbatim}' > $@
-+# expand -8 $< >> $@
-+# echo '\end{verbatim}' >> $@
-+#
-+#klu_simple_c.tex: ../Demo/klu_simple.c
-+# echo '\\begin{verbatim}' > $@
-+# expand -8 $< >> $@
-+# echo '\end{verbatim}' >> $@
-+#
-+#KLU_UserGuide.pdf: KLU_UserGuide.tex KLU_UserGuide.bib $(SRC)
-+# pdflatex KLU_UserGuide
-+# bibtex KLU_UserGuide
-+# pdflatex KLU_UserGuide
-+# pdflatex KLU_UserGuide
-+#
-+#clean-local:
-+# -$(RM) *.aux *.bbl *.blg *.log *.toc
-+# -$(RM) $(SRC)
++# $(verbatim)
++btf_h.tex:
++ echo '\begin{verbatim}' > $@
++ echo 'See your btf.h local install' >> $@
++ echo '\end{verbatim}' >> $@
++
++klu_simple_c.tex: $(top_srcdir)/Demo/klu_simple.c
++ $(verbatim)
++
++TEX = TEXINPUTS="$(srcdir):" pdflatex -interaction nonstopmode -file-line-error
++BIB = BIBINPUTS="$(srcdir):" bibtex
++%.pdf: %.tex %.bbl
++ $(TEX) $*
++ while grep -q "Rerun to get cross-references right" $*.log; do \
++ $(TEX) $*; \
++ done
++%.bbl: %.aux %.bib
++ $(BIB) $*
++%.aux: %.tex
++ $(TEX) $*
++
++CLEANFILES = *.aux *.bbl *.blg *.log *.toc $(SRC)
++MAINTAINERCLEANFILES = $(dist_pdf_DATA)
diff --git a/Include/Makefile.am b/Include/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Include/Makefile.am
-@@ -0,0 +1,2 @@
-+pkgincludedir = $(includedir)/klu
+@@ -0,0 +1 @@
+pkginclude_HEADERS = klu.h klu_internal.h klu_version.h
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
@@ -131,7 +139,7 @@ new file mode 100644
--- /dev/null
+++ b/Source/Makefile.am
@@ -0,0 +1,40 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(BTF_CFLAGS) $(COLAMD_CFLAGS)
++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS)
+
+noinst_LTLIBRARIES = libklud.la libkluz.la libklul.la libkluzl.la
+
@@ -169,68 +177,82 @@ new file mode 100644
+
+lib_LTLIBRARIES = libklu.la
+libklu_la_SOURCES =
-+libklu_la_LIBADD = libklud.la libkluz.la libklul.la libkluzl.la $(AMD_LIBS) $(BTF_LIBS) $(COLAMD_LIBS)
-+libklu_la_LDFLAGS = -no-undefined -version-info 2:2:1
++libklu_la_LIBADD = libklud.la libkluz.la libklul.la libkluzl.la $(AMD_LIBS) $(COLAMD_LIBS) $(BTF_LIBS)
++libklu_la_LDFLAGS = -no-undefined -version-number 1:2:1
diff --git a/User/Makefile.am b/User/Makefile.am
new file mode 100644
--- /dev/null
+++ b/User/Makefile.am
-@@ -0,0 +1,11 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(BTF_CFLAGS) $(COLAMD_CFLAGS) $(CHOLMOD_CFLAGS) $(UFCONFIG_CFLAGS)
+@@ -0,0 +1,12 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS) $(CHOLMOD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS)
+
+EXTRA_DIST = README.txt
+
-+pkgincludedir = $(includedir)/klu
++if CHOLMOD
+pkginclude_HEADERS = klu_cholmod.h
+
+lib_LTLIBRARIES = libklu_cholmod.la
+libklu_cholmod_la_SOURCES = klu_cholmod.c klu_l_cholmod.c
+libklu_cholmod_la_LIBADD = $(CHOLMOD_LIBS)
-+libklu_cholmod_la_LDFLAGS = -no-undefined -version-info 2:2:1
++libklu_cholmod_la_LDFLAGS = -no-undefined -version-number 1:2:1
++endif
diff --git a/configure.ac b/configure.ac
new file mode 100644
--- /dev/null
+++ b/configure.ac
-@@ -0,0 +1,49 @@
-+AC_PREREQ([2.68])
-+AC_INIT([KLU],[1.1.2],[davis@cise.ufl.edu])
+@@ -0,0 +1,62 @@
++# -*- Autoconf -*-
++# Process this file with autoconf to produce a configure script.
++
++AC_PREREQ([2.69])
++AC_INIT([KLU],[1.2.1],[DrTimothyAldenDavis@gmail.com],[klu],[http://www.suitesparse.com/])
+AC_CONFIG_SRCDIR([Source/klu.c])
-+AC_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+
++# Checks for programs.
+AC_PROG_INSTALL
+AC_PROG_CC
+
+LIBS_SAVED=$LIBS
+
++# Checks for libraries.
+AC_CHECK_LIB([m], [sqrt])
+
-+AC_CHECK_HEADERS([limits.h stdlib.h])
-+
+PKG_PROG_PKG_CONFIG
-+PKG_CHECK_MODULES([UFCONFIG],[ufconfig],
++PKG_CHECK_MODULES([SUITESPARSECONFIG],[suitesparseconfig],
+ [],
-+ [AC_MSG_ERROR([cannot find ufconfig])])
++ [AC_MSG_ERROR([cannot find suitesparseconfig])])
+PKG_CHECK_MODULES([AMD],[amd],
+ [],
+ [AC_MSG_ERROR([cannot find amd])])
-+PKG_CHECK_MODULES([BTF],[btf],
-+ [],
-+ [AC_MSG_ERROR([cannot find btf])])
+PKG_CHECK_MODULES([COLAMD],[colamd],
+ [],
+ [AC_MSG_ERROR([cannot find colamd])])
-+PKG_CHECK_MODULES([CHOLMOD],[cholmod],
++PKG_CHECK_MODULES([BTF],[btf],
+ [],
-+ [AC_MSG_ERROR([cannot find cholmod])])
++ [AC_MSG_ERROR([cannot find btf])])
++PKG_CHECK_MODULES([CHOLMOD],[cholmod],
++ [cholmod="yes"],
++ [cholmod="no"])
++if test "x$cholmod" != "xyes"; then
++ AC_MSG_WARN([cannot find cholmod, disabling some functionality])
++fi
++
++# Checks for header files.
++AC_CHECK_HEADERS([limits.h stdlib.h])
+
++# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_SIZE_T
+
++# Checks for library functions.
+AC_CHECK_FUNCS([sqrt])
+
+LIBS=$LIBS_SAVED
+
++AM_CONDITIONAL([CHOLMOD], [test "x$cholmod" = "xyes"])
++
+AC_CONFIG_FILES([
+ klu.pc
+ Makefile
@@ -245,7 +267,7 @@ diff --git a/klu.pc.in b/klu.pc.in
new file mode 100644
--- /dev/null
+++ b/klu.pc.in
-@@ -0,0 +1,12 @@
+@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
@@ -254,7 +276,8 @@ new file mode 100644
+Name: @PACKAGE_NAME@
+Description: Sparse LU factorization for circuit simulation
+Version: @PACKAGE_VERSION@
-+Requires.private: amd btf colamd
++URL: @PACKAGE_URL@
++Requires.private: amd colamd btf
+Libs: -L${libdir} -lklu
+Libs.private: -lm
+Cflags: -I${includedir}/klu