misc.m4 498 B

123456789101112
  1. dnl ERROR_IF_NO_PROG
  2. dnl A quick / dirty macro to ensure that a required program / executable
  3. dnl is on PATH. If it is not we display an error message using AC_MSG_ERROR.
  4. dnl $1: program name
  5. AC_DEFUN([ERROR_IF_NO_PROG],[
  6. AC_CHECK_PROG(AS_TR_SH([result_$1]), [$1], [yes], [no])
  7. AS_VAR_PUSHDEF([result], [result_$1])
  8. AS_IF([test "x$result" != "xyes"], [
  9. AC_MSG_ERROR([Missing required program '$1': ensure it is installed and on PATH.])
  10. ])
  11. AS_VAR_POPDEF([result])
  12. ])