2
0

missing.m4 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  2. # Copyright (C) 1997-2017 Free Software Foundation, Inc.
  3. #
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # AM_MISSING_PROG(NAME, PROGRAM)
  8. # ------------------------------
  9. AC_DEFUN([AM_MISSING_PROG],
  10. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  11. $1=${$1-"${am_missing_run}$2"}
  12. AC_SUBST($1)])
  13. # AM_MISSING_HAS_RUN
  14. # ------------------
  15. # Define MISSING if not defined so far and test if it is modern enough.
  16. # If it is, set am_missing_run to use it, otherwise, to nothing.
  17. AC_DEFUN([AM_MISSING_HAS_RUN],
  18. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  19. AC_REQUIRE_AUX_FILE([missing])dnl
  20. if test x"${MISSING+set}" != xset; then
  21. case $am_aux_dir in
  22. *\ * | *\ *)
  23. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  24. *)
  25. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  26. esac
  27. fi
  28. # Use eval to expand $SHELL
  29. if eval "$MISSING --is-lightweight"; then
  30. am_missing_run="$MISSING "
  31. else
  32. am_missing_run=
  33. AC_MSG_WARN(['missing' script is too old or missing])
  34. fi
  35. ])