autotoolize.diff 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. diff --git a/Demo/Makefile.am b/Demo/Makefile.am
  2. new file mode 100644
  3. --- /dev/null
  4. +++ b/Demo/Makefile.am
  5. @@ -0,0 +1,30 @@
  6. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  7. +LDADD = $(top_builddir)/Source/libccolamd.la
  8. +
  9. +EXTRA_DIST = \
  10. + ccolamd_example.out \
  11. + ccolamd_l_example.out
  12. +
  13. +# Disable the .out implicit pattern rule. Prevents GNU make from
  14. +# adding bogus dependencies for the .out files listed above.
  15. +%.out: %
  16. +
  17. +check_PROGRAMS = \
  18. + ccolamd_example \
  19. + ccolamd_l_example
  20. +
  21. +ccolamd_example_SOURCES = ccolamd_example.c
  22. +ccolamd_l_example_SOURCES = ccolamd_l_example.c
  23. +
  24. +check-local: $(check_PROGRAMS) $(check_PROGRAMS:=.out)
  25. + @for i in $(check_PROGRAMS); do \
  26. + echo "Testing $$i"; \
  27. + ./$$i$(EXEEXT) > my_$$i.out; \
  28. + if diff -u $(srcdir)/$$i.out my_$$i.out; then \
  29. + echo "Test $$i PASSED."; \
  30. + else \
  31. + echo "Test $$i FAILED."; \
  32. + fi; \
  33. + done
  34. +
  35. +CLEANFILES = my_*.out
  36. diff --git a/Include/Makefile.am b/Include/Makefile.am
  37. new file mode 100644
  38. --- /dev/null
  39. +++ b/Include/Makefile.am
  40. @@ -0,0 +1 @@
  41. +pkginclude_HEADERS = ccolamd.h
  42. diff --git a/Makefile.am b/Makefile.am
  43. new file mode 100644
  44. --- /dev/null
  45. +++ b/Makefile.am
  46. @@ -0,0 +1,5 @@
  47. +SUBDIRS = Include Source Demo
  48. +EXTRA_DIST = README.txt Doc/ChangeLog Doc/lesser.txt
  49. +
  50. +pkgconfigdir = $(libdir)/pkgconfig
  51. +pkgconfig_DATA = ccolamd.pc
  52. diff --git a/Source/Makefile.am b/Source/Makefile.am
  53. new file mode 100644
  54. --- /dev/null
  55. +++ b/Source/Makefile.am
  56. @@ -0,0 +1,18 @@
  57. +AM_CPPFLAGS = -I$(top_srcdir)/Include $(SUITESPARSECONFIG_CFLAGS)
  58. +
  59. +CCOLAMDSRC = \
  60. + ccolamd.c
  61. +
  62. +lib_LTLIBRARIES = libccolamd.la
  63. +noinst_LTLIBRARIES = libccolamdl.la libccolamdi.la
  64. +
  65. +libccolamdi_la_SOURCES = $(CCOLAMDSRC)
  66. +libccolamdi_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm
  67. +
  68. +libccolamdl_la_SOURCES = $(CCOLAMDSRC)
  69. +libccolamdl_la_LIBADD = $(SUITESPARSECONFIG_LIBS) -lm
  70. +libccolamdl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
  71. +
  72. +libccolamd_la_SOURCES =
  73. +libccolamd_la_LIBADD = libccolamdi.la libccolamdl.la
  74. +libccolamd_la_LDFLAGS = -no-undefined -release $(PACKAGE_VERSION)
  75. diff --git a/ccolamd.pc.in b/ccolamd.pc.in
  76. new file mode 100644
  77. --- /dev/null
  78. +++ b/ccolamd.pc.in
  79. @@ -0,0 +1,13 @@
  80. +prefix=@prefix@
  81. +exec_prefix=@exec_prefix@
  82. +libdir=@libdir@
  83. +includedir=@includedir@
  84. +
  85. +Name: @PACKAGE_NAME@
  86. +Description: Constrained column approximate minimum degree ordering
  87. +Version: @PACKAGE_VERSION@
  88. +URL: @PACKAGE_URL@
  89. +Requires.private: suitesparseconfig
  90. +Libs: -L${libdir} -lccolamd
  91. +Libs.private: -lm
  92. +Cflags: -I${includedir}/ccolamd
  93. diff --git a/configure.ac b/configure.ac
  94. new file mode 100644
  95. --- /dev/null
  96. +++ b/configure.ac
  97. @@ -0,0 +1,42 @@
  98. +# -*- Autoconf -*-
  99. +# Process this file with autoconf to produce a configure script.
  100. +
  101. +AC_PREREQ([2.69])
  102. +AC_INIT([CCOLAMD],[2.9.1],[DrTimothyAldenDavis@gmail.com],[ccolamd],[http://www.suitesparse.com/])
  103. +AC_CONFIG_SRCDIR([Source/ccolamd.c])
  104. +AC_CONFIG_HEADERS([config.h])
  105. +AM_INIT_AUTOMAKE([foreign])
  106. +LT_INIT
  107. +
  108. +# Checks for programs.
  109. +AC_PROG_INSTALL
  110. +AC_PROG_CC
  111. +
  112. +LIBS_SAVED=$LIBS
  113. +
  114. +# Checks for libraries.
  115. +AC_CHECK_LIB([m], [sqrt])
  116. +
  117. +PKG_PROG_PKG_CONFIG
  118. +PKG_CHECK_MODULES([SUITESPARSECONFIG],[suitesparseconfig],
  119. + [],
  120. + [AC_MSG_ERROR([cannot find suitesparseconfig])])
  121. +
  122. +# Checks for header files.
  123. +AC_CHECK_HEADERS([limits.h stdlib.h])
  124. +
  125. +# Checks for typedefs, structures, and compiler characteristics.
  126. +AC_TYPE_SIZE_T
  127. +
  128. +# Checks for library functions.
  129. +AC_CHECK_FUNCS([sqrt])
  130. +
  131. +LIBS=$LIBS_SAVED
  132. +
  133. +AC_CONFIG_FILES([
  134. + ccolamd.pc
  135. + Makefile
  136. + Demo/Makefile
  137. + Include/Makefile
  138. + Source/Makefile])
  139. +AC_OUTPUT