Previously I used to use the gl_WARN_ADD autoconf macro from gnulib to
test whether the compiler supports specific Objective C warning flags.
After recent gnulib changes to make gl_UNKNOWN_WARNINGS_ARE_ERRORS
language-specific, this broke. Attached is a patch to fix that. I'm
pretty sure I already have a copyright assignment on file for gnulib,
but if not, this patch should be trivial enough to apply anyways.

Thanks,
Eric Gallager

(P.S.: please cc me; I'm not subscribed to this list)
--- m4/warnings_copy.m4 2018-02-18 01:00:06.000000000 -0500
+++ m4/warnings.m4      2018-02-18 01:09:30.000000000 -0500
@@ -76,6 +76,15 @@
   AC_LANG_POP([C++])
 ])
 
+# Specialization for _AC_LANG = Objective C. This macro can be AC_REQUIREd.
+# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
+m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)],
+[
+  AC_LANG_PUSH([Objective C])
+  gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
+  AC_LANG_POP([Objective C])
+])
+
 AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL],
 [gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option],
    [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'],

Reply via email to