File: ax_prog_scala.m4

package info (click to toggle)
autoconf-archive 20180313-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,144 kB
  • sloc: sh: 695; python: 62; makefile: 49
file content (35 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ===========================================================================
#      https://www.gnu.org/software/autoconf-archive/ax_prog_scala.html
# ===========================================================================
#
# SYNOPSIS
#
#   AX_PROG_SCALA
#
# DESCRIPTION
#
#   AX_PROG_SCALA will check that scala is available. If it is SCALA will be
#   set to its path and SCALA_VERSION will be set to its version.
#
#   Hint: AX_COMPARE_VERSION can be used to check if SCALA_VERSION has an
#   acceptable value.
#
# LICENSE
#
#   Copyright (c) 2013 Sveinung Kvilhaugsvik <sveinung84@users.sourceforge.net>
#
#   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.  This file is offered as-is, without any
#   warranty.

#serial 2

AC_ARG_VAR(SCALA, [scala runner])

AC_DEFUN([AX_PROG_SCALA], [
  AC_CHECK_PROGS(SCALA, [scala])
  AS_IF([test x"$SCALA" != x], [
      AC_SUBST(SCALA_VERSION, `"$SCALA" -e "println(util.Properties.versionString.split(\" \")(1))"`)
      AC_MSG_NOTICE([Scala version $SCALA_VERSION found])
    ], AC_MSG_WARN([Scala not found]))])