<commit_before>##
## additional m4 macros
##
## (C) 1999 <NAME> (<EMAIL>)
##


dnl check for kernel source

AC_DEFUN([AC_PATH_KERNEL_SOURCE_SEARCH],
[
  kerneldir=missing
  kernelext=ko
  no_kernel=yes

  if test `uname` != "Linux"; then
    kerneldir="not running Linux"
  else
    shortvers="$( uname -r | sed -r 's/(@<:@2-9@:>@\.@<:@0-9@:>@+).*/\1/' )"
    for dir in ${ac_kerneldir} \
        /usr/src/kernel-source-`uname -r` \
        /usr/src/linux-source-`uname -r` \
        /usr/src/kernel-source-$shortvers \
        /usr/src/linux-source-$shortvers \
        /usr/src/linux /lib/modules/`uname -r`/source \
        /lib/modules/`uname -r`/build
    do
      if test -d $dir; then
        kerneldir=`dirname $dir/Makefile`/
        no_kernel=no
        break
      fi;
    done
  fi

  if test x${no_kernel} != xyes; then
    if test -f ${kerneldir}/Makefile; then
      version=$( sed -n '/^VERSION/s/.*=\ *//p' ${kerneldir}/Makefile )
      patchlevel=$( sed -n -e '/^PATCHLEVEL/s/.*=\ *//p' ${kerneldir}/Makefile )
      if test "${version}" -eq 2; then
        if test "${patchlevel}" -lt 5; then
          kernelext=o
        fi
      fi
    else
      kerneldir="no Makefile found"
      no_kernel=yes
    fi
  fi
  ac_cv_have_kernel="no_kernel=${no_kernel} \
                kerneldir=\"${kerneldir}\" \
                kernelext=\"${kernelext}\""
]
)

AC_DEFUN([AC_PATH_KERNEL_SOURCE],
[
  AC_CHECK_PROG(ac_pkss_mktemp,mktemp,yes,no)
  AC_PROVIDE([AC_PATH_KERNEL_SOURCE])<commit_msg>ac-path-kernel-source.m4: Default to bundled header.<commit_after>##
## additional m4 macros
##
## (C) 1999 <NAME> (<EMAIL>)
##


dnl check for kernel source

AC_DEFUN([AC_PATH_KERNEL_SOURCE_SEARCH],
[
  kerneldir=missing
  kernelext=ko
  no_kernel=yes

  if test `uname` != "Linux"; then
    kerneldir="not running Linux"
  else
    shortvers="$( uname -r | sed -r 's/(@<:@2-9@:>@\.@<:@0-9@:>@+).*/\1/' )"
    for dir in ${ac_kerneldir} \
        /usr/src/kernel-source-* \
        /usr/src/linux-source-* \
        /usr/src/linux /lib/modules/*/source \
        /lib/modules/*/build
    do
      if test -d $dir; then
        kerneldir=`dirname $dir/Makefile`/ || continue
        no_kernel=no
        break
      fi;
    done
  fi

  if test x${no_kernel} = xyes; then
      kerneldir=`pwd`
  fi
  ac_cv_have_kernel="no_kernel=${no_kernel} \
                kerneldir=\"${kerneldir}\" \
                kernelext=\"ko\""
]
)

AC_DEFUN([AC_PATH_KERNEL_SOURCE],
[
  AC_CHECK_PROG(ac_pkss_mktemp,mktemp,yes,no)
  AC_PROVIDE([AC_PATH_KERNEL_SOURCE])
{'fraction_non_alphanumeric': 0.17137254901960786, 'fraction_numerical': 0.009019607843137255, 'mean_word_length': 2.4058744993324432, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6858389', 'n_tokens_mistral': 1008, 'n_tokens_neox': 971, 'n_words': 182}