check_posix_sh.m4 673 B

12345678910111213141516171819
  1. # CHECK_POSIX_SH
  2. # --------------
  3. AC_DEFUN([CHECK_POSIX_SH], [
  4. # Allow users to manually specify the path to a POSIX shell.
  5. AC_ARG_VAR([POSIX_SH], [path of a POSIX shell])
  6. AS_IF([test "x${POSIX_SH}" = "x"], [
  7. # If POSIX_SH is not set, get the default value of PATH which
  8. # is specified to find the standard POSIX utilities.
  9. POSIX_PATH=`command -p getconf PATH`
  10. AS_IF([test "x${POSIX_PATH}" = "x"],
  11. AC_MSG_ERROR(["cannot get the default PATH"]))
  12. # Get the path of sh within POSIX_PATH.
  13. AC_PATH_PROG([POSIX_SH], [sh], [""], [${POSIX_PATH}])
  14. AS_IF([test "x${POSIX_SH}" = "x"],
  15. AC_MSG_ERROR(["cannot find a POSIX shell"]))
  16. ])
  17. ])# CHECK_POSIX_SH