Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_prog_scala.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_PROG_SCALA
  8. #
  9. # DESCRIPTION
  10. #
  11. # AX_PROG_SCALA will check that scala is available. If it is SCALA will be
  12. # set to its path and SCALA_VERSION will be set to its version.
  13. #
  14. # Hint: AX_COMPARE_VERSION can be used to check if SCALA_VERSION has an
  15. # acceptable value.
  16. #
  17. # LICENSE
  18. #
  19. # Copyright (c) 2013 Sveinung Kvilhaugsvik <sveinung84@users.sourceforge.net>
  20. #
  21. # Copying and distribution of this file, with or without modification, are
  22. # permitted in any medium without royalty provided the copyright notice
  23. # and this notice are preserved. This file is offered as-is, without any
  24. # warranty.
  25. #serial 2
  26. AC_ARG_VAR(SCALA, [scala runner])
  27. AC_DEFUN([AX_PROG_SCALA], [
  28. AC_CHECK_PROGS(SCALA, [scala])
  29. AS_IF([test x"$SCALA" != x], [
  30. AC_SUBST(SCALA_VERSION, `"$SCALA" -e "println(util.Properties.versionString.split(\" \")(1))"`)
  31. AC_MSG_NOTICE([Scala version $SCALA_VERSION found])
  32. ], AC_MSG_WARN([Scala not found]))])