<commit_before>dnl
dnl Licensed to the Apache Software Foundation (ASF) under one or more
dnl contributor license agreements.  See the NOTICE file distributed with
dnl this work for additional information regarding copyright ownership.
dnl The ASF licenses this file to You under the Apache License, Version 2.0
dnl (the "License"); you may not use this file except in compliance with
dnl the License.  You may obtain a copy of the License at
dnl
dnl     http://www.apache.org/licenses/LICENSE-2.0
dnl
dnl Unless required by applicable law or agreed to in writing, software
dnl distributed under the License is distributed on an "AS IS" BASIS,
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
dnl See the License for the specific language governing permissions and
dnl limitations under the License.
dnl

dnl -------------------------------------------------------------------------
dnl Author  <NAME>
dnl Author  <NAME>
dnl Version $Id$
dnl -------------------------------------------------------------------------

AC_DEFUN([AP_FIND_JAVA],[
  AC_ARG_WITH(java,[  --with-java=DIR         Specify the location of your JDK installation],[
    AC_MSG_CHECKING([JAVA_HOME])
    if test -d "$withval"
    then
      JAVA_HOME="$withval"
      AC_MSG_RESULT([$JAVA_HOME])
    else
      AC_MSG_RESULT([failed])
      AC_MSG_ERROR([$withval is not a directory])
    fi
    AC_SUBST(JAVA_HOME)
  ])
  if test "x$JAVA_HOME" = x
  then
    AC_MSG_CHECKING([for JDK location])
    # Oh well, nobody set JAVA_HOME, have to guess
    # Check if we have java in the PATH.
    java_prog="`which java 2>/dev/null || true`"
    if test "x$java_prog" != x
    then
      java_bin="`dirname $java_prog`"
      java_top="`dirname $java_bin`"
      if test -d "$java_top/include"
      then
        JAVA_HOME="$java_top"
        AC_MSG_RESULT([${java_top}])
      fi
    fi
  fi
  if test "x$JAVA_HOME" = x
  then
    # Oh well, nobody set JAVA_HOME, have to guess
    for java_prefix in /usr/local /usr/local/lib /usr /usr/lib /usr/lib/jvm /opt /usr/java /System/Library/Frameworks/JavaVM.framework/Versions/
    do
      for subversion in 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2
      do
        for variant in IBMJava2- java java- jdk jdk-
        do
          for guess in $java_prefix/$variant$subversion*
          do
            if test -d "${guess}/bin" & test -d "${guess}/include"<commit_msg>Add OSX specific JDK detection locations<commit_after>dnl
dnl Licensed to the Apache Software Foundation (ASF) under one or more
dnl contributor license agreements.  See the NOTICE file distributed with
dnl this work for additional information regarding copyright ownership.
dnl The ASF licenses this file to You under the Apache License, Version 2.0
dnl (the "License"); you may not use this file except in compliance with
dnl the License.  You may obtain a copy of the License at
dnl
dnl     http://www.apache.org/licenses/LICENSE-2.0
dnl
dnl Unless required by applicable law or agreed to in writing, software
dnl distributed under the License is distributed on an "AS IS" BASIS,
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
dnl See the License for the specific language governing permissions and
dnl limitations under the License.
dnl

dnl -------------------------------------------------------------------------
dnl Author  <NAME>
dnl Author  <NAME>
dnl Version $Id$
dnl -------------------------------------------------------------------------

AC_DEFUN([AP_FIND_JAVA],[
  AC_ARG_WITH(java,[  --with-java=DIR         Specify the location of your JDK installation],[
    AC_MSG_CHECKING([JAVA_HOME])
    if test -d "$withval"
    then
      JAVA_HOME="$withval"
      AC_MSG_RESULT([$JAVA_HOME])
    else
      AC_MSG_RESULT([failed])
      AC_MSG_ERROR([$withval is not a directory])
    fi
    AC_SUBST(JAVA_HOME)
  ])
  if test "x$JAVA_HOME" = x
  then
    AC_MSG_CHECKING([for JDK location])
    # Oh well, nobody set JAVA_HOME, have to guess
    # Check if we have java in the PATH.
    java_prog="`which java 2>/dev/null || true`"
    if test "x$java_prog" != x
    then
      java_bin="`dirname $java_prog`"
      java_top="`dirname $java_bin`"
      if test -d "$java_top/include"
      then
        JAVA_HOME="$java_top"
        AC_MSG_RESULT([${java_top}])
      fi
    fi
  fi
  if test "x$JAVA_HOME" = x
  then
    # Oh well, nobody set JAVA_HOME, have to guess
    for java_prefix in /usr/local /usr/local/lib /usr /usr/lib /usr/lib/jvm /opt /usr/java /System/Library/Frameworks/JavaVM.framework/Versions/
    do
      for subversion in 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2
      do
        for variant in IBMJava2- java java- jdk jdk- CurrentJDK ""
        do
          for guess in $java_prefix/$variant$subversion*
          do
            if test -d "${guess}/bin" & test -d "${guess}/include"
{'fraction_non_alphanumeric': 0.14200206398348814, 'fraction_numerical': 0.009081527347781218, 'mean_word_length': 2.3746518105849583, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4312424', 'n_tokens_mistral': 1530, 'n_tokens_neox': 1469, 'n_words': 547}