summaryrefslogtreecommitdiff
path: root/libraries/LDL/autotoolize.diff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/LDL/autotoolize.diff')
-rw-r--r--libraries/LDL/autotoolize.diff66
1 files changed, 50 insertions, 16 deletions
diff --git a/libraries/LDL/autotoolize.diff b/libraries/LDL/autotoolize.diff
index 280c0ed0a2..455cfacacf 100644
--- a/libraries/LDL/autotoolize.diff
+++ b/libraries/LDL/autotoolize.diff
@@ -2,15 +2,17 @@ diff --git a/Demo/Makefile.am b/Demo/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Demo/Makefile.am
-@@ -0,0 +1,58 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/Include
+@@ -0,0 +1,60 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include $(AMD_CFLAGS) $(UFCONFIG_CFLAGS)
+LDADD = $(top_builddir)/Source/libldl.la
+
+EXTRA_DIST = \
+ ldlamd.out \
+ ldllamd.out \
+ ldlmain.out \
-+ ldlsimple.out
++ ldllmain.out \
++ ldlsimple.out \
++ ldllsimple.out
+
+# Disable the .out implicit pattern rule. Prevents GNU make from
+# adding bogus dependencies for the .out files listed above.
@@ -26,11 +28,11 @@ new file mode 100644
+
+ldlamd_SOURCES = ldlmain.c
+ldlamd_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_AMD
-+ldlamd_LDADD = $(LDADD) -lamd
++ldlamd_LDADD = $(LDADD) $(AMD_LIBS)
+
+ldllamd_SOURCES = ldlmain.c
+ldllamd_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_AMD -DLDL_LONG
-+ldllamd_LDADD = $(LDADD) -lamd
++ldllamd_LDADD = $(LDADD) $(AMD_LIBS)
+
+ldlmain_SOURCES = ldlmain.c
+
@@ -79,14 +81,23 @@ new file mode 100644
+
+clean-local:
+ -$(RM) *.aux *.bbl *.blg *.log *.toc
+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)/ldl
++pkginclude_HEADERS = ldl.h
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
--- /dev/null
+++ b/Makefile.am
-@@ -0,0 +1,3 @@
-+SUBDIRS = Source Matrix Demo Doc
+@@ -0,0 +1,5 @@
++SUBDIRS = Include Source Matrix Demo Doc
+EXTRA_DIST = README.txt
-+include_HEADERS = Include/ldl.h
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = ldl.pc
diff --git a/Matrix/Makefile.am b/Matrix/Makefile.am
new file mode 100644
--- /dev/null
@@ -101,7 +112,7 @@ new file mode 100644
--- /dev/null
+++ b/Source/Makefile.am
@@ -0,0 +1,16 @@
-+AM_CPPFLAGS = -I$(top_srcdir)/Include
++AM_CPPFLAGS = -I$(top_srcdir)/Include $(UFCONFIG_CFLAGS)
+
+LDLSRC = \
+ ldl.c
@@ -116,14 +127,14 @@ new file mode 100644
+
+libldl_la_SOURCES =
+libldl_la_LIBADD = libldli.la libldll.la
-+libldl_la_LDFLAGS = -no-undefined -version-info 2:2:0
++libldl_la_LDFLAGS = -no-undefined -version-info 2:3:0
diff --git a/configure.ac b/configure.ac
new file mode 100644
--- /dev/null
+++ b/configure.ac
-@@ -0,0 +1,29 @@
-+AC_PREREQ([2.65])
-+AC_INIT([LDL], [2.0.2], [davis@cise.ufl.edu])
+@@ -0,0 +1,36 @@
++AC_PREREQ([2.68])
++AC_INIT([LDL],[2.0.3],[davis@cise.ufl.edu])
+AC_CONFIG_SRCDIR([Source/ldl.c])
+AC_CONFIG_HEADER([config.h])
+AM_INIT_AUTOMAKE([foreign])
@@ -135,19 +146,42 @@ new file mode 100644
+
+LIBS_SAVED=$LIBS
+
-+AC_CHECK_LIB([amd], [amd_order])
-+
+AC_CHECK_HEADERS([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])])
+
+AC_FUNC_MALLOC
+
+LIBS=$LIBS_SAVED
+
+AC_CONFIG_FILES([
++ ldl.pc
+ Makefile
+ Demo/Makefile
+ Doc/Makefile
++ Include/Makefile
+ Matrix/Makefile
+ Source/Makefile])
+AC_OUTPUT
+diff --git a/ldl.pc.in b/ldl.pc.in
+new file mode 100644
+--- /dev/null
++++ b/ldl.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: A simple LDL^T factorization
++Version: @PACKAGE_VERSION@
++Requires.private: ufconfig
++Libs: -L${libdir} -lldl
++Cflags: -I${includedir}/ldl