make/autoconf/lib-tests.m4
author mullan
Wed, 13 Nov 2019 13:43:06 -0500
changeset 59059 27a266d5fb13
parent 52595 16609197022c
permissions -rw-r--r--
8214483: Remove algorithms that use MD5 or DES from security requirements Reviewed-by: xuelei
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50908
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     1
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     2
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     4
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    10
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    15
# accompanied this code).
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    16
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    20
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    23
# questions.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    24
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    25
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    26
###############################################################################
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    27
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    28
# Check for graalunit libs, needed for running graalunit tests.
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    29
#
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    30
AC_DEFUN_ONCE([LIB_TESTS_SETUP_GRAALUNIT],
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    31
[
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    32
  AC_ARG_WITH(graalunit-lib, [AS_HELP_STRING([--with-graalunit-lib],
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    33
      [specify location of 3rd party libraries used by Graal unit tests])])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    34
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    35
  GRAALUNIT_LIB=
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    36
  if test "x${with_graalunit_lib}" != x; then
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    37
    AC_MSG_CHECKING([for graalunit libs])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    38
    if test "x${with_graalunit_lib}" = xno; then
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    39
      AC_MSG_RESULT([disabled, graalunit tests can not be run])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    40
    elif test "x${with_graalunit_lib}" = xyes; then
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    41
      AC_MSG_RESULT([not specified])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    42
      AC_MSG_ERROR([You must specify the path to 3rd party libraries used by Graal unit tests])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    43
    else
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    44
      GRAALUNIT_LIB="${with_graalunit_lib}"
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    45
      if test ! -d "${GRAALUNIT_LIB}"; then
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    46
        AC_MSG_RESULT([no])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    47
        AC_MSG_ERROR([Could not find graalunit 3rd party libraries as specified. (${with_graalunit_lib})])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    48
      else
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    49
        AC_MSG_RESULT([$GRAALUNIT_LIB])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    50
      fi
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    51
    fi
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    52
  fi
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    53
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    54
  BASIC_FIXUP_PATH([GRAALUNIT_LIB])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    55
  AC_SUBST(GRAALUNIT_LIB)
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    56
])
7c51db95ccb6 8205207: Port Graal unit tests under jtreg
epavlova
parents:
diff changeset
    57
52595
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    58
###############################################################################
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    59
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    60
# Setup and check the Java Microbenchmark Harness
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    61
#
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    62
AC_DEFUN_ONCE([LIB_TESTS_SETUP_JMH],
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    63
[
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    64
  AC_ARG_WITH(jmh, [AS_HELP_STRING([--with-jmh],
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    65
      [Java Microbenchmark Harness for building the OpenJDK Microbenchmark Suite])])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    66
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    67
  AC_MSG_CHECKING([for jmh (Java Microbenchmark Harness)])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    68
  if test "x$with_jmh" = xno || test "x$with_jmh" = x; then
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    69
    AC_MSG_RESULT([no, disabled])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    70
  elif test "x$with_jmh" = xyes; then
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    71
    AC_MSG_RESULT([no, error])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    72
    AC_MSG_ERROR([--with-jmh requires a directory containing all jars needed by JMH])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    73
  else
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    74
    # Path specified
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    75
    JMH_HOME="$with_jmh"
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    76
    if test ! -d [$JMH_HOME]; then
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    77
      AC_MSG_RESULT([no, error])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    78
      AC_MSG_ERROR([$JMH_HOME does not exist or is not a directory])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    79
    fi
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    80
    BASIC_FIXUP_PATH([JMH_HOME])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    81
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    82
    jar_names="jmh-core jmh-generator-annprocess jopt-simple commons-math3"
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    83
    for jar in $jar_names; do
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    84
      found_jar_files=$($ECHO $(ls $JMH_HOME/$jar-*.jar 2> /dev/null))
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    85
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    86
      if test "x$found_jar_files" = x; then
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    87
        AC_MSG_RESULT([no])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    88
        AC_MSG_ERROR([--with-jmh does not contain $jar-*.jar])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    89
      elif ! test -e "$found_jar_files"; then
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    90
        AC_MSG_RESULT([no])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    91
        AC_MSG_ERROR([--with-jmh contain multiple $jar-*.jar: $found_jar_files])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    92
      fi
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    93
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    94
      found_jar_var_name=found_${jar//-/_}
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    95
      eval $found_jar_var_name='"'$found_jar_files'"'
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    96
    done
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    97
    AC_MSG_RESULT([yes])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    98
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
    99
    JMH_CORE_JAR=$found_jmh_core
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   100
    JMH_GENERATOR_JAR=$found_jmh_generator_annprocess
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   101
    JMH_JOPT_SIMPLE_JAR=$found_jopt_simple
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   102
    JMH_COMMONS_MATH_JAR=$found_commons_math3
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   103
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   104
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   105
    if [ [[ "$JMH_CORE_JAR" =~ jmh-core-(.*)\.jar$ ]] ] ; then
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   106
      JMH_VERSION=${BASH_REMATCH[[1]]}
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   107
    else
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   108
      JMH_VERSION=unknown
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   109
    fi
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   110
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   111
    AC_MSG_NOTICE([JMH core version: $JMH_VERSION])
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   112
  fi
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   113
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   114
  AC_SUBST(JMH_CORE_JAR)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   115
  AC_SUBST(JMH_GENERATOR_JAR)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   116
  AC_SUBST(JMH_JOPT_SIMPLE_JAR)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   117
  AC_SUBST(JMH_COMMONS_MATH_JAR)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   118
  AC_SUBST(JMH_VERSION)
16609197022c 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents: 50908
diff changeset
   119
])