summaryrefslogtreecommitdiff
path: root/academic/ldl/patches/autoconfiscate.diff
diff options
context:
space:
mode:
Diffstat (limited to 'academic/ldl/patches/autoconfiscate.diff')
-rw-r--r--academic/ldl/patches/autoconfiscate.diff141
1 files changed, 74 insertions, 67 deletions
diff --git a/academic/ldl/patches/autoconfiscate.diff b/academic/ldl/patches/autoconfiscate.diff
index d9bd23ca0a..ea7bcaf561 100644
--- a/academic/ldl/patches/autoconfiscate.diff
+++ b/academic/ldl/patches/autoconfiscate.diff
@@ -189,7 +189,7 @@ new file mode 100644
+
+AM_CONDITIONAL([AMD], [test "x$have_amd" = "xyes"])
+
-+PKG_INSTALLDIR
++m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_SUBST([pkgconfigdir], [${libdir}/pkgconfig])])
+AC_CONFIG_FILES([
+ ldl.pc
+ Makefile
@@ -221,7 +221,7 @@ diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4
new file mode 100644
--- /dev/null
+++ b/m4/ax_code_coverage.m4
-@@ -0,0 +1,264 @@
+@@ -0,0 +1,271 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html
+# ===========================================================================
@@ -299,68 +299,48 @@ new file mode 100644
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
-+#serial 24
++#serial 27
+
-+AC_DEFUN([AX_CODE_COVERAGE],[
-+ dnl Check for --enable-code-coverage
-+ AC_REQUIRE([AC_PROG_SED])
++AC_DEFUN([_AX_CODE_COVERAGE_ENABLED],[
++ # check for gcov
++ AC_CHECK_TOOL([GCOV],
++ [$_AX_CODE_COVERAGE_GCOV_PROG_WITH],
++ [:])
++ AS_IF([test "X$GCOV" = "X:"],
++ [AC_MSG_ERROR([gcov is needed to do coverage])])
++ AC_SUBST([GCOV])
+
-+ # allow to override gcov location
-+ AC_ARG_WITH([gcov],
-+ [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])],
-+ [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov],
-+ [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov])
++ dnl Check if gcc is being used
++ AS_IF([ test "$GCC" = "no" ], [
++ AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
++ ])
+
-+ AC_MSG_CHECKING([whether to build with code coverage support])
-+ AC_ARG_ENABLE([code-coverage],
-+ AS_HELP_STRING([--enable-code-coverage],
-+ [Whether to enable code coverage support]),,
-+ enable_code_coverage=no)
++ AC_CHECK_PROG([LCOV], [lcov], [lcov])
++ AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
+
-+ AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
-+ AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
-+ AC_MSG_RESULT($enable_code_coverage)
++ AS_IF([ test x"$LCOV" = x ], [
++ AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed])
++ ])
+
-+ AS_IF([ test "$enable_code_coverage" = "yes" ], [
-+ # check for gcov
-+ AC_CHECK_TOOL([GCOV],
-+ [$_AX_CODE_COVERAGE_GCOV_PROG_WITH],
-+ [:])
-+ AS_IF([test "X$GCOV" = "X:"],
-+ [AC_MSG_ERROR([gcov is needed to do coverage])])
-+ AC_SUBST([GCOV])
-+
-+ dnl Check if gcc is being used
-+ AS_IF([ test "$GCC" = "no" ], [
-+ AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
-+ ])
-+
-+ AC_CHECK_PROG([LCOV], [lcov], [lcov])
-+ AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
-+
-+ AS_IF([ test -z "$LCOV" ], [
-+ AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed])
-+ ])
-+
-+ AS_IF([ test -z "$GENHTML" ], [
-+ AC_MSG_ERROR([Could not find genhtml from the lcov package])
-+ ])
-+
-+ dnl Build the code coverage flags
-+ dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility
-+ CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
-+ CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
-+ CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
-+ CODE_COVERAGE_LIBS="-lgcov"
-+ CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS"
-+
-+ AC_SUBST([CODE_COVERAGE_CPPFLAGS])
-+ AC_SUBST([CODE_COVERAGE_CFLAGS])
-+ AC_SUBST([CODE_COVERAGE_CXXFLAGS])
-+ AC_SUBST([CODE_COVERAGE_LIBS])
-+ AC_SUBST([CODE_COVERAGE_LDFLAGS])
-+
-+ [CODE_COVERAGE_RULES_CHECK='
++ AS_IF([ test x"$GENHTML" = x ], [
++ AC_MSG_ERROR([Could not find genhtml from the lcov package])
++ ])
++
++ dnl Build the code coverage flags
++ dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility
++ CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
++ CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
++ CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
++ CODE_COVERAGE_LIBS="-lgcov"
++ CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS"
++
++ AC_SUBST([CODE_COVERAGE_CPPFLAGS])
++ AC_SUBST([CODE_COVERAGE_CFLAGS])
++ AC_SUBST([CODE_COVERAGE_CXXFLAGS])
++ AC_SUBST([CODE_COVERAGE_LIBS])
++ AC_SUBST([CODE_COVERAGE_LDFLAGS])
++
++ [CODE_COVERAGE_RULES_CHECK='
+ -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
+ $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
+']
@@ -379,12 +359,39 @@ new file mode 100644
+ -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
+ -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete
+']
-+ ], [
-+ [CODE_COVERAGE_RULES_CHECK='
++])
++
++AC_DEFUN([_AX_CODE_COVERAGE_DISABLED],[
++ [CODE_COVERAGE_RULES_CHECK='
+ @echo "Need to reconfigure with --enable-code-coverage"
-+']
-+ CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK"
-+ CODE_COVERAGE_RULES_CLEAN=''
++ ']
++ CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK"
++ CODE_COVERAGE_RULES_CLEAN=''
++])
++
++AC_DEFUN([AX_CODE_COVERAGE],[
++ dnl Check for --enable-code-coverage
++
++ # allow to override gcov location
++ AC_ARG_WITH([gcov],
++ [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])],
++ [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov],
++ [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov])
++
++ AC_MSG_CHECKING([whether to build with code coverage support])
++ AC_ARG_ENABLE([code-coverage],
++ AS_HELP_STRING([--enable-code-coverage],
++ [Whether to enable code coverage support]),,
++ enable_code_coverage=no)
++
++ AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test "x$enable_code_coverage" = xyes])
++ AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
++ AC_MSG_RESULT($enable_code_coverage)
++
++ AS_IF([ test "x$enable_code_coverage" = xyes ], [
++ _AX_CODE_COVERAGE_ENABLED
++ ], [
++ _AX_CODE_COVERAGE_DISABLED
+ ])
+
+[CODE_COVERAGE_RULES='
@@ -445,6 +452,9 @@ new file mode 100644
+CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
+CODE_COVERAGE_IGNORE_PATTERN ?=
+
++GITIGNOREFILES ?=
++GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
++
+code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
+code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\
@@ -474,9 +484,6 @@ new file mode 100644
+
+'"$CODE_COVERAGE_RULES_CLEAN"'
+
-+GITIGNOREFILES ?=
-+GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
-+
+A''M_DISTCHECK_CONFIGURE_FLAGS ?=
+A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
+