From 36c393d6dd1e22e1cc2d32afc03d5b39c00f5ae1 Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Sat, 19 Nov 2016 14:51:44 -0600 Subject: academic/klu: Updated for version 1.3.8. Signed-off-by: Kyle Guinn --- academic/klu/autotoolize.diff | 283 ---------------------------------- academic/klu/klu.SlackBuild | 20 ++- academic/klu/klu.info | 6 +- academic/klu/patches/autotoolize.diff | 277 +++++++++++++++++++++++++++++++++ 4 files changed, 293 insertions(+), 293 deletions(-) delete mode 100644 academic/klu/autotoolize.diff create mode 100644 academic/klu/patches/autotoolize.diff (limited to 'academic') diff --git a/academic/klu/autotoolize.diff b/academic/klu/autotoolize.diff deleted file mode 100644 index b664f48fb8..0000000000 --- a/academic/klu/autotoolize.diff +++ /dev/null @@ -1,283 +0,0 @@ -diff --git a/Demo/Makefile.am b/Demo/Makefile.am -new file mode 100644 ---- /dev/null -+++ b/Demo/Makefile.am -@@ -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 = \ -+ klu_simple.out \ -+ kludemo.out -+ -+# Disable the .out implicit pattern rule. Prevents GNU make from -+# adding bogus dependencies for the .out files listed above. -+%.out: % -+ -+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 -+ -+kluldemo_SOURCES = kluldemo.c -+kluldemo_LDADD = $(LDADD) $(CHOLMOD_LIBS) -lm -+ -+MATRICES = \ -+ $(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 < $(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,48 @@ -+EXTRA_DIST = ChangeLog lesser.txt -+ -+dist_noinst_DATA = KLU_UserGuide.tex KLU_UserGuide.bib -+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 -+# $(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 @@ -+pkginclude_HEADERS = klu.h klu_internal.h klu_version.h -diff --git a/Makefile.am b/Makefile.am -new file mode 100644 ---- /dev/null -+++ b/Makefile.am -@@ -0,0 +1,5 @@ -+SUBDIRS = Include Source User Matrix Demo Doc -+EXTRA_DIST = README.txt -+ -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = klu.pc -diff --git a/Matrix/Makefile.am b/Matrix/Makefile.am -new file mode 100644 ---- /dev/null -+++ b/Matrix/Makefile.am -@@ -0,0 +1,11 @@ -+dist_noinst_DATA = \ -+ 1c.mtx \ -+ GD99_cc.mtx \ -+ arrow.mtx \ -+ arrowc.mtx \ -+ ctina.mtx \ -+ impcol_a.mtx \ -+ one.mtx \ -+ onec.mtx \ -+ two.mtx \ -+ w156.mtx -diff --git a/Source/Makefile.am b/Source/Makefile.am -new file mode 100644 ---- /dev/null -+++ b/Source/Makefile.am -@@ -0,0 +1,40 @@ -+AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS) $(SUITESPARSECONFIG_CFLAGS) -+ -+noinst_LTLIBRARIES = libklud.la libkluz.la libklul.la libkluzl.la -+ -+KLUSRC = \ -+ klu.c \ -+ klu_diagnostics.c \ -+ klu_dump.c \ -+ klu_extract.c \ -+ klu_factor.c \ -+ klu_free_numeric.c \ -+ klu_kernel.c \ -+ klu_refactor.c \ -+ klu_scale.c \ -+ klu_solve.c \ -+ klu_sort.c \ -+ klu_tsolve.c -+ -+CKLUSRC = \ -+ klu_analyze.c \ -+ klu_analyze_given.c \ -+ klu_defaults.c \ -+ klu_free_symbolic.c \ -+ klu_memory.c -+ -+libklud_la_SOURCES = $(KLUSRC) $(CKLUSRC) -+ -+libkluz_la_SOURCES = $(KLUSRC) -+libkluz_la_CPPFLAGS = $(AM_CPPFLAGS) -DCOMPLEX -+ -+libklul_la_SOURCES = $(KLUSRC) $(CKLUSRC) -+libklul_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -+ -+libkluzl_la_SOURCES = $(KLUSRC) -+libkluzl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DCOMPLEX -+ -+lib_LTLIBRARIES = libklu.la -+libklu_la_SOURCES = -+libklu_la_LIBADD = libklud.la libkluz.la libklul.la libkluzl.la $(AMD_LIBS) $(COLAMD_LIBS) $(BTF_LIBS) $(SUITESPARSECONFIG_LIBS) -+libklu_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION) -diff --git a/User/Makefile.am b/User/Makefile.am -new file mode 100644 ---- /dev/null -+++ b/User/Makefile.am -@@ -0,0 +1,12 @@ -+AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS) $(CHOLMOD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS) -+ -+EXTRA_DIST = README.txt -+ -+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 -release $(PACKAGE_VERSION) -+endif -diff --git a/configure.ac b/configure.ac -new file mode 100644 ---- /dev/null -+++ b/configure.ac -@@ -0,0 +1,62 @@ -+# -*- Autoconf -*- -+# Process this file with autoconf to produce a configure script. -+ -+AC_PREREQ([2.69]) -+AC_INIT([KLU],[1.3.3],[DrTimothyAldenDavis@gmail.com],[klu],[http://www.suitesparse.com/]) -+AC_CONFIG_SRCDIR([Source/klu.c]) -+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]) -+ -+PKG_PROG_PKG_CONFIG -+PKG_CHECK_MODULES([SUITESPARSECONFIG],[suitesparseconfig], -+ [], -+ [AC_MSG_ERROR([cannot find suitesparseconfig])]) -+PKG_CHECK_MODULES([AMD],[amd], -+ [], -+ [AC_MSG_ERROR([cannot find amd])]) -+PKG_CHECK_MODULES([COLAMD],[colamd], -+ [], -+ [AC_MSG_ERROR([cannot find colamd])]) -+PKG_CHECK_MODULES([BTF],[btf], -+ [], -+ [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 -+ Demo/Makefile -+ Doc/Makefile -+ Include/Makefile -+ Matrix/Makefile -+ Source/Makefile -+ User/Makefile]) -+AC_OUTPUT -diff --git a/klu.pc.in b/klu.pc.in -new file mode 100644 ---- /dev/null -+++ b/klu.pc.in -@@ -0,0 +1,13 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+Name: @PACKAGE_NAME@ -+Description: Sparse LU factorization for circuit simulation -+Version: @PACKAGE_VERSION@ -+URL: @PACKAGE_URL@ -+Requires.private: suitesparseconfig amd colamd btf -+Libs: -L${libdir} -lklu -+Libs.private: -lm -+Cflags: -I${includedir}/klu diff --git a/academic/klu/klu.SlackBuild b/academic/klu/klu.SlackBuild index 28b2092bbb..b1a6464d11 100644 --- a/academic/klu/klu.SlackBuild +++ b/academic/klu/klu.SlackBuild @@ -25,14 +25,14 @@ PRGNAM=klu SRCNAM=SuiteSparse SUBDIR=KLU -VERSION=${VERSION:-1.3.3} -SRCVER=${SRCVER:-4.4.6} +VERSION=${VERSION:-1.3.8} +SRCVER=${SRCVER:-4.5.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$(uname -m)" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$(uname -m) ;; esac @@ -43,11 +43,14 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -DOCS="README.txt Doc/ChangeLog Doc/lesser.txt" +DOCS="README.txt Doc/ChangeLog Doc/License.txt Doc/lesser.txt" if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" +elif [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" @@ -73,10 +76,12 @@ cd $SRCNAM/$SUBDIR chown -R root:root . chmod -R u+w,go-w,a+rX-st . -patch -p1 < $CWD/autotoolize.diff +patch -p1 < $CWD/patches/autotoolize.diff autoreconf -vif -CFLAGS="$SLKCFLAGS" \ +# Avoid rebuilding the docs. +touch Doc/KLU_UserGuide.pdf + ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ @@ -88,7 +93,8 @@ CFLAGS="$SLKCFLAGS" \ --enable-shared \ --disable-static \ --disable-dependency-tracking \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux \ + CFLAGS="$SLKCFLAGS" \ make make check diff --git a/academic/klu/klu.info b/academic/klu/klu.info index 617b8ccc97..104cb556ce 100644 --- a/academic/klu/klu.info +++ b/academic/klu/klu.info @@ -1,8 +1,8 @@ PRGNAM="klu" -VERSION="1.3.3" +VERSION="1.3.8" HOMEPAGE="http://faculty.cse.tamu.edu/davis/suitesparse.html" -DOWNLOAD="http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.6.tar.gz" -MD5SUM="131a3a5e2dee784cd946284e44ce9af2" +DOWNLOAD="http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.3.tar.gz" +MD5SUM="8ec57324585df3c6483ad7f556afccbd" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="suitesparseconfig amd colamd btf" diff --git a/academic/klu/patches/autotoolize.diff b/academic/klu/patches/autotoolize.diff new file mode 100644 index 0000000000..423e84572c --- /dev/null +++ b/academic/klu/patches/autotoolize.diff @@ -0,0 +1,277 @@ +diff --git a/Demo/Makefile.am b/Demo/Makefile.am +new file mode 100644 +--- /dev/null ++++ b/Demo/Makefile.am +@@ -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 = \ ++ klu_simple.out \ ++ kludemo.out ++ ++# Disable the .out implicit pattern rule. Prevents GNU make from ++# adding bogus dependencies for the .out files listed above. ++%.out: % ++ ++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 ++ ++kluldemo_SOURCES = kluldemo.c ++kluldemo_LDADD = $(LDADD) $(CHOLMOD_LIBS) -lm ++ ++MATRICES = \ ++ $(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 < $(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,51 @@ ++EXTRA_DIST = \ ++ ChangeLog \ ++ License.txt \ ++ lesser.txt ++ ++dist_noinst_DATA = KLU_UserGuide.tex KLU_UserGuide.bib ++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 ++# $(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 @@ ++pkginclude_HEADERS = klu.h klu_internal.h klu_version.h +diff --git a/Makefile.am b/Makefile.am +new file mode 100644 +--- /dev/null ++++ b/Makefile.am +@@ -0,0 +1,4 @@ ++SUBDIRS = Include Source User Matrix Demo Doc ++EXTRA_DIST = README.txt ++ ++pkgconfig_DATA = klu.pc +diff --git a/Matrix/Makefile.am b/Matrix/Makefile.am +new file mode 100644 +--- /dev/null ++++ b/Matrix/Makefile.am +@@ -0,0 +1,11 @@ ++dist_noinst_DATA = \ ++ 1c.mtx \ ++ GD99_cc.mtx \ ++ arrow.mtx \ ++ arrowc.mtx \ ++ ctina.mtx \ ++ impcol_a.mtx \ ++ one.mtx \ ++ onec.mtx \ ++ two.mtx \ ++ w156.mtx +diff --git a/Source/Makefile.am b/Source/Makefile.am +new file mode 100644 +--- /dev/null ++++ b/Source/Makefile.am +@@ -0,0 +1,40 @@ ++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS) $(SUITESPARSECONFIG_CFLAGS) ++ ++noinst_LTLIBRARIES = libklud.la libkluz.la libklul.la libkluzl.la ++ ++KLUSRC = \ ++ klu.c \ ++ klu_diagnostics.c \ ++ klu_dump.c \ ++ klu_extract.c \ ++ klu_factor.c \ ++ klu_free_numeric.c \ ++ klu_kernel.c \ ++ klu_refactor.c \ ++ klu_scale.c \ ++ klu_solve.c \ ++ klu_sort.c \ ++ klu_tsolve.c ++ ++CKLUSRC = \ ++ klu_analyze.c \ ++ klu_analyze_given.c \ ++ klu_defaults.c \ ++ klu_free_symbolic.c \ ++ klu_memory.c ++ ++libklud_la_SOURCES = $(KLUSRC) $(CKLUSRC) ++ ++libkluz_la_SOURCES = $(KLUSRC) ++libkluz_la_CPPFLAGS = $(AM_CPPFLAGS) -DCOMPLEX ++ ++libklul_la_SOURCES = $(KLUSRC) $(CKLUSRC) ++libklul_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG ++ ++libkluzl_la_SOURCES = $(KLUSRC) ++libkluzl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DCOMPLEX ++ ++lib_LTLIBRARIES = libklu.la ++libklu_la_SOURCES = ++libklu_la_LIBADD = libklud.la libkluz.la libklul.la libkluzl.la $(AMD_LIBS) $(COLAMD_LIBS) $(BTF_LIBS) $(SUITESPARSECONFIG_LIBS) ++libklu_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION) +diff --git a/User/Makefile.am b/User/Makefile.am +new file mode 100644 +--- /dev/null ++++ b/User/Makefile.am +@@ -0,0 +1,12 @@ ++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(COLAMD_CFLAGS) $(BTF_CFLAGS) $(CHOLMOD_CFLAGS) $(SUITESPARSECONFIG_CFLAGS) ++ ++EXTRA_DIST = README.txt ++ ++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 -release $(PACKAGE_VERSION) ++endif +diff --git a/configure.ac b/configure.ac +new file mode 100644 +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,54 @@ ++# -*- Autoconf -*- ++# Process this file with autoconf to produce a configure script. ++ ++AC_PREREQ([2.69]) ++AC_INIT([KLU],[1.3.8],[DrTimothyAldenDavis@gmail.com],[klu],[http://www.suitesparse.com/]) ++AC_CONFIG_SRCDIR([Source/klu.c]) ++AC_CONFIG_HEADERS([config.h]) ++AM_INIT_AUTOMAKE([foreign]) ++LT_INIT ++ ++# Checks for programs. ++PKG_PROG_PKG_CONFIG ++AC_PROG_INSTALL ++AC_PROG_CC ++ ++AS_VAR_SET([LIBS_SAVED], [$LIBS]) ++ ++# Checks for libraries. ++AC_CHECK_LIB([m], [sqrt]) ++ ++PKG_CHECK_MODULES([SUITESPARSECONFIG], [suitesparseconfig]) ++PKG_CHECK_MODULES([AMD], [amd]) ++PKG_CHECK_MODULES([COLAMD], [colamd]) ++PKG_CHECK_MODULES([BTF], [btf]) ++PKG_CHECK_MODULES([CHOLMOD], [cholmod], ++ [AS_VAR_SET([have_cholmod], [yes])], ++ [AS_VAR_SET([have_cholmod], [no]) ++ AC_MSG_WARN([$CHOLMOD_PKG_ERRORS, disabling some functionality])]) ++ ++# 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]) ++ ++AS_VAR_SET([LIBS], [$LIBS_SAVED]) ++ ++AM_CONDITIONAL([CHOLMOD], [test "x$have_cholmod" = "xyes"]) ++ ++PKG_INSTALLDIR ++AC_CONFIG_FILES([ ++ klu.pc ++ Makefile ++ Demo/Makefile ++ Doc/Makefile ++ Include/Makefile ++ Matrix/Makefile ++ Source/Makefile ++ User/Makefile ++]) ++AC_OUTPUT +diff --git a/klu.pc.in b/klu.pc.in +new file mode 100644 +--- /dev/null ++++ b/klu.pc.in +@@ -0,0 +1,13 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: @PACKAGE_NAME@ ++Description: Sparse LU factorization for circuit simulation ++Version: @PACKAGE_VERSION@ ++URL: @PACKAGE_URL@ ++Requires.private: suitesparseconfig amd colamd btf ++Libs: -L${libdir} -lklu ++Libs.private: -lm ++Cflags: -I${includedir}/klu -- cgit v1.2.3