Bruno Haible <bruno <at> clisp.org> writes: > Here is a proposed change to m4/wchar.m4 that diagnoses the problem before > the btowc test program is even compiled.
Yes, that is a nicer approach. > AC_DEFUN([gl_WCHAR_H], > [ > @@ -34,6 +34,8 @@ > WCHAR_H=wchar.h > fi > > + gl_WCHAR_H_INLINE_OK Why not AC_REQUIRE it here? > + if test $gl_cv_header_wchar_h_correct_inline = no; then > + AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS). Must we error out, or can we use AC_DEFINE/AC_SUBST to make our <wchar.h> substitute work around the problem by never calling #include_next? In other words, can't we treat things like the system <wchar.h> doesn't exist? All of the other system headers that #include <wchar.h> will pick up our working substitute. Once we solve that issue, then yes, I'm in favor of your approach. -- Eric Blake
