diff options
Diffstat (limited to 'libraries/KLU/autotoolize.diff')
-rw-r--r-- | libraries/KLU/autotoolize.diff | 86 |
1 files changed, 64 insertions, 22 deletions
diff --git a/libraries/KLU/autotoolize.diff b/libraries/KLU/autotoolize.diff index 5fd6db0b91..690e34a9ed 100644 --- a/libraries/KLU/autotoolize.diff +++ b/libraries/KLU/autotoolize.diff @@ -3,7 +3,7 @@ new file mode 100644 --- /dev/null +++ b/Demo/Makefile.am @@ -0,0 +1,44 @@ -+AM_CPPFLAGS = -I$(top_srcdir)/Include ++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(BTF_CFLAGS) $(COLAMD_CFLAGS) $(CHOLMOD_CFLAGS) +LDADD = $(top_builddir)/Source/libklu.la + +EXTRA_DIST = \ @@ -21,10 +21,10 @@ new file mode 100644 +klu_simple_SOURCES = klu_simple.c + +kludemo_SOURCES = kludemo.c -+kludemo_LDADD = $(LDADD) -lcholmod -lm ++kludemo_LDADD = $(LDADD) $(CHOLMOD_LIBS) -lm + +kluldemo_SOURCES = kluldemo.c -+kluldemo_LDADD = $(LDADD) -lcholmod -lm ++kluldemo_LDADD = $(LDADD) $(CHOLMOD_LIBS) -lm + +MATRICES = \ + ../Matrix/1c.mtx \ @@ -93,14 +93,23 @@ new file mode 100644 +#clean-local: +# -$(RM) *.aux *.bbl *.blg *.log *.toc +# -$(RM) $(SRC) +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 ++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,3 @@ -+SUBDIRS = Source User Matrix Demo Doc +@@ -0,0 +1,5 @@ ++SUBDIRS = Include Source User Matrix Demo Doc +EXTRA_DIST = README.txt -+include_HEADERS = Include/klu.h Include/klu_internal.h Include/klu_version.h ++ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = klu.pc diff --git a/Matrix/Makefile.am b/Matrix/Makefile.am new file mode 100644 --- /dev/null @@ -122,7 +131,7 @@ new file mode 100644 --- /dev/null +++ b/Source/Makefile.am @@ -0,0 +1,40 @@ -+AM_CPPFLAGS = -I$(top_srcdir)/Include ++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(BTF_CFLAGS) $(COLAMD_CFLAGS) + +noinst_LTLIBRARIES = libklud.la libkluz.la libklul.la libkluzl.la + @@ -160,29 +169,31 @@ new file mode 100644 + +lib_LTLIBRARIES = libklu.la +libklu_la_SOURCES = -+libklu_la_LIBADD = libklud.la libkluz.la libklul.la libkluzl.la -lamd -lbtf -lcolamd -+libklu_la_LDFLAGS = -no-undefined -version-info 2:1:1 ++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 diff --git a/User/Makefile.am b/User/Makefile.am new file mode 100644 --- /dev/null +++ b/User/Makefile.am -@@ -0,0 +1,9 @@ -+AM_CPPFLAGS = -I$(top_srcdir)/Include +@@ -0,0 +1,11 @@ ++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(BTF_CFLAGS) $(COLAMD_CFLAGS) $(CHOLMOD_CFLAGS) $(UFCONFIG_CFLAGS) + +EXTRA_DIST = README.txt + -+include_HEADERS = klu_cholmod.h ++pkgincludedir = $(includedir)/klu ++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 = -lcholmod -+libklu_cholmod_la_LDFLAGS = -no-undefined -version-info 2:1:1 ++libklu_cholmod_la_LIBADD = $(CHOLMOD_LIBS) ++libklu_cholmod_la_LDFLAGS = -no-undefined -version-info 2:2:1 diff --git a/configure.ac b/configure.ac new file mode 100644 --- /dev/null +++ b/configure.ac -@@ -0,0 +1,35 @@ -+AC_PREREQ([2.65]) -+AC_INIT([KLU], [1.1.1], [davis@cise.ufl.edu]) +@@ -0,0 +1,49 @@ ++AC_PREREQ([2.68]) ++AC_INIT([KLU],[1.1.2],[davis@cise.ufl.edu]) +AC_CONFIG_SRCDIR([Source/klu.c]) +AC_CONFIG_HEADER([config.h]) +AM_INIT_AUTOMAKE([foreign]) @@ -194,13 +205,25 @@ new file mode 100644 +LIBS_SAVED=$LIBS + +AC_CHECK_LIB([m], [sqrt]) -+AC_CHECK_LIB([amd], [amd_order]) -+AC_CHECK_LIB([btf], [btf_order]) -+AC_CHECK_LIB([colamd], [colamd_recommended]) -+AC_CHECK_LIB([cholmod], [cholmod_start]) + +AC_CHECK_HEADERS([limits.h stdlib.h]) -+AC_CHECK_HEADERS([UFconfig.h]) ++ ++PKG_PROG_PKG_CONFIG ++PKG_CHECK_MODULES([UFCONFIG],[ufconfig], ++ [], ++ [AC_MSG_ERROR([cannot find ufconfig])]) ++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], ++ [], ++ [AC_MSG_ERROR([cannot find cholmod])]) + +AC_TYPE_SIZE_T + @@ -209,10 +232,29 @@ new file mode 100644 +LIBS=$LIBS_SAVED + +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,12 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: @PACKAGE_NAME@ ++Description: Sparse LU factorization for circuit simulation ++Version: @PACKAGE_VERSION@ ++Requires.private: amd btf colamd ++Libs: -L${libdir} -lklu ++Libs.private: -lm ++Cflags: -I${includedir}/klu |