<commit_before># SYNOPSIS
#
#   Add code coverage support with gcov/lcov.
#
#   AX_CODE_COVERAGE()
#
# DESCRIPTION
#
#   Provides a --enable-coverage option which checks for available
#   gcov/lcov binaries and provides ENABLE_CODE_COVERAGE conditional.
#
# LAST MODIFICATION
#
#   $Id: coverage.m4 35027 2012-12-04 00:01:34Z roystgnr $
#
# COPYLEFT
#
#   Copyright (c) 2012 <NAME> <<EMAIL>>
#   Copyright (c) 2010 <NAME> <<EMAIL>>
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved.

AC_DEFUN([AX_CODE_COVERAGE],
[

AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage],[configure code coverage analysis tools]))

HAVE_GCOV_TOOLS=0

GCOV_FLAGS=""

if test "x$enable_coverage" = "xyes"; then

   # ----------------------------
   # Check for gcov/lcov binaries
   # ----------------------------

   AC_CHECK_PROG(have_gcov,gcov, yes, no)

   if test "x$have_gcov" = "xno"; then
      AC_MSG_ERROR([

      gcov coverage testing tool not found. Please install or update
      your PATH accordingly prior to enabling code coverage features.

         ])
   fi

   # ----------------------------------
   # include coverage compiler options
   # ----------------------------------

   HAVE_GCOV_TOOLS=1
   GCOV_FLAGS="--coverage"

   # Test for C...

   ac_coverage_save_CFLAGS="$CFLAGS"

   AC_LANG_PUSH([C])
   CFLAGS="${GCOV_FLAGS} ${CFLAGS}"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],
     [AC_MSG_ERROR([unable to compile with code coverage ($CC --coverage)])])
   AC_LANG_POP([C])

   # Test for C++...

   ac_coverage_save_CXXFLAGS="$CXXFLAGS"

   AC_LANG_PUSH([C++])
   CXXFLAGS="${GCOV_FLAGS} ${CXXFLAGS}"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],
     [AC_MSG_ERROR([unable to compile with code coverage ($CXX --coverage)])])
   AC_LANG_POP([C++])

   # Test for Fortran...

   ac_coverage_save_FCFLAGS="$FCFLAGS"

   AC_LANG_PUSH([Fortran])
   FCFLAGS="${GCOV_FLAGS} ${FCFLAGS}"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],
     [AC_MSG_ERROR([unable to compile with code coverage ($FC --coverage)])])
   AC_LANG_POP([Fortran])

fi

AC_SUBST(GCOV_FLAGS)
AC_SUBST(HAVE_GCOV_TOOLS)
AM_CONDITIONAL(CODE_COVERAGE_ENABLED,test x$HAVE_GCOV_TOOLS = x1)

])


<commit_msg>Latest coverage.m4 from PECOS<commit_after># SYNOPSIS
#
#   Add code coverage support with gcov/lcov.
#
#   AX_CODE_COVERAGE()
#
# DESCRIPTION
#
#   Provides a --enable-coverage option which checks for available
#   gcov/lcov binaries and provides ENABLE_CODE_COVERAGE conditional.
#
# LAST MODIFICATION
#
#   $Id: coverage.m4 48028 2015-08-21 21:08:00Z roystgnr $
#
# COPYLEFT
#
#   Copyright (c) 2012 <NAME> <<EMAIL>>
#   Copyright (c) 2010 <NAME> <<EMAIL>>
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved.

AC_DEFUN([AX_CODE_COVERAGE],
[

AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage],[configure code coverage analysis tools]))

HAVE_GCOV_TOOLS=0

GCOV_FLAGS=""

if test "x$enable_coverage" = "xyes"; then

   # ----------------------------
   # Check for gcov/lcov binaries
   # ----------------------------
   
   AC_CHECK_PROG(have_gcov,gcov, yes, no)

   if test "x$have_gcov" = "xno"; then
      AC_MSG_ERROR([

      gcov coverage testing tool not found. Please install or update
      your PATH accordingly prior to enabling code coverage features.

      ])
   fi

   # ----------------------------------
   # include coverage compiler options
   # ----------------------------------

   HAVE_GCOV_TOOLS=1
   GCOV_FLAGS="-fprofile-arcs -ftest-coverage --coverage"
   GCOV_LDFLAGS="--coverage -lgcov"

   ac_coverage_save_LDFLAGS="$LDFLAGS"
   LDFLAGS="${LDFLAGS} ${GCOV_LDFLAGS}"

   # Test for C...

   ac_coverage_save_CFLAGS="$CFLAGS"

   AC_LANG_PUSH([C])
   CFLAGS="${GCOV_FLAGS} ${CFLAGS}"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[], 
     [AC_MSG_ERROR([unable to compile with code coverage ($CC --coverage)])])
   AC_LANG_POP([C])

   # Test for C++...

   ac_coverage_save_CXXFLAGS="$CXXFLAGS"

   AC_LANG_PUSH([C++])
   CXXFLAGS="${GCOV_FLAGS} ${CXXFLAGS}"
   LIBS="-lgcov ${LIBS}"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[], 
     [AC_MSG_ERROR([unable to compile with code coverage ($CXX --coverage)])])
   AC_LANG_POP([C++])

   # Test for Fortran...

   ac_coverage_save_FCFLAGS="$FCFLAGS"

   AC_LANG_PUSH([Fortran])
   FCFLAGS="${GCOV_FLAGS} ${FCFLAGS}"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],
     [AC_MSG_ERROR([unable to compile with code coverage ($FC --coverage)])])
   AC_LANG_POP([Fortran])

fi

AC_SUBST(GCOV_FLAGS)
AC_SUBST(GCOV_LDFLAGS)
AC_SUBST(HAVE_GCOV_TOOLS)
AM_CONDITIONAL(CODE_COVERAGE_ENABLED,test x$HAVE_GCOV_TOOLS = x1)

])



{'fraction_non_alphanumeric': 0.17729042836646855, 'fraction_numerical': 0.01291248206599713, 'mean_word_length': 3.2582897033158815, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4389532', 'n_tokens_mistral': 1856, 'n_tokens_neox': 1713, 'n_words': 371}