ac_lang_werror.m4 627 B

123456789101112131415
  1. # AC_LANG_WERROR([VALUE])
  2. # -----------------------
  3. # How to treat warnings from the current language's preprocessor, compiler,
  4. # and linker:
  5. # 1. No arguments: treat warnings as fatal errors.
  6. # 2. One argument: on -- treat, off -- do not treat warnings as fatal errors.
  7. AC_DEFUN([AC_LANG_WERROR],
  8. [m4_if(
  9. $#, 1, [m4_if(
  10. [$1], [on], [ac_[]_AC_LANG_ABBREV[]_werror_flag=yes],
  11. [$1], [off], [ac_[]_AC_LANG_ABBREV[]_werror_flag=],
  12. [m4_fatal([$0: wrong argument: `$1'])])],
  13. $#, 0, [ac_[]_AC_LANG_ABBREV[]_werror_flag=yes],
  14. [m4_fatal([$0: incorrect number of arguments: $#])])
  15. ])# AC_LANG_WERROR