x_ac_env.m4 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ##*****************************************************************************
  2. # AUTHOR:
  3. # Morris Jette <jette1@llnl.gov>
  4. #
  5. # SYNOPSIS:
  6. # X_AC_ENV_LOGIC
  7. #
  8. # DESCRIPTION:
  9. # Test for how user's environment should be loaded for sbatch's
  10. # --get-user-env option (as used by Moab)
  11. ##*****************************************************************************
  12. AC_DEFUN([X_AC_ENV_LOGIC], [
  13. AC_MSG_CHECKING([whether sbatch --get-user-env option should load .login])
  14. AC_ARG_ENABLE(
  15. [load-env-no-login],
  16. AS_HELP_STRING(--enable-load-env-no-login,
  17. [enable --get-user-env option to load user environment without .login]),
  18. [ case "$enableval" in
  19. yes) x_ac_load_env_no_login=yes ;;
  20. no) x_ac_load_env_no_login=no ;;
  21. *) AC_MSG_RESULT([doh!])
  22. AC_MSG_ERROR([bad value "$enableval" for --enable-load-env-no-login]) ;;
  23. esac
  24. ],
  25. [x_ac_load_env_no_login=no]
  26. )
  27. if test "$x_ac_load_env_no_login" = yes; then
  28. AC_MSG_RESULT([yes])
  29. AC_DEFINE(LOAD_ENV_NO_LOGIN, 1,
  30. [Define to 1 for --get-user-env to load user environment without .login])
  31. else
  32. AC_MSG_RESULT([no])
  33. fi
  34. ])