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.

54 lines
1.5KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_luarocks_rock.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_LUAROCKS_ROCK([ROCK])
  8. #
  9. # DESCRIPTION
  10. #
  11. # Checks for a rock, and fails if it is not installed.
  12. #
  13. # Example usage:
  14. #
  15. # AX_LUAROCKS_ROCK(stdlib)
  16. #
  17. # Note: use of this macro is not normally recommended. Normally, LuaRocks
  18. # should be used to drive the build system, and it takes care of rock
  19. # dependencies. Use this macro only if LuaRocks cannot be used at the top
  20. # level, for example, in a build system that uses Lua only incidentally.
  21. #
  22. # LICENSE
  23. #
  24. # Copyright (c) 2016 Reuben Thomas <rrt@sc3d.org>
  25. #
  26. # Copying and distribution of this file, with or without modification, are
  27. # permitted in any medium without royalty provided the copyright notice
  28. # and this notice are preserved. This file is offered as-is, without any
  29. # warranty.
  30. #serial 2
  31. AC_DEFUN([AX_LUAROCKS_ROCK],[
  32. # Make sure we have luarocks
  33. if test -z "$LUAROCKS"; then
  34. AX_WITH_PROG(LUAROCKS,luarocks)
  35. if test -z "$LUAROCKS"; then
  36. AC_MSG_ERROR([can't find luarocks])
  37. fi
  38. fi
  39. AC_PREREQ([2.61])
  40. pushdef([ROCK],$1)
  41. AC_MSG_CHECKING(whether LuaRock ROCK is installed)
  42. AS_IF(["$LUAROCKS" show ROCK > /dev/null],[
  43. AC_MSG_RESULT(yes)
  44. ],[
  45. AC_MSG_FAILURE([LuaRock ROCK not found])
  46. ])
  47. popdef([ROCK])
  48. ])