I am having trouble with the following autoconf test. I am running
autoconf 2.14 (from the CVS yesterday).

dnl   Check for broken USHRT_MAX (under Mingwin and maybe some other
systems)
AC_CACHE_CHECK(for broken ushrt_max, jikes_cv_ushrt_max_is_broken,
    AC_TRY_COMPILE([
#include <limits.h>
#if ! (USHRT_MAX == 0xFFFF)
int hi=0;
#endif
],[return 0;], jikes_cv_ushrt_max_is_broken=yes ,
               jikes_cv_ushrt_max_is_broken=no)
)
if test "$jikes_cv_ushrt_max_is_broken" = "yes" ; then
    AC_DEFINE(HAVE_BROKEN_USHRT_MAX)
fi


autoheader does not seem to pick up this HAVE statement.

% autoheader
% grep BROKEN config.h.in

But if I make the following change.

--- configure.in        2000/04/17 19:13:40     1.3
+++ configure.in        2000/04/17 19:42:01
@@ -98,7 +98,7 @@
                jikes_cv_ushrt_max_is_broken=no)
 )
 if test "$jikes_cv_ushrt_max_is_broken" = "yes" ; then
-    AC_DEFINE(BROKEN_USHRT_MAX)
+    AC_DEFINE(HAVE_BROKEN_USHRT_MAX, , [known to be broken on mingwin
beta 20]) fi


Then autoheader does "see" the HAVE_BROKEN_USHRT_MAX symbol.

% autoheader
% grep BROKEN config.h.in
#undef HAVE_BROKEN_USHRT_MAX

What's the deal? is this a bug in autoheader or what? The autoconf
docs do not seem to say anything about this.

Mo Dejong
Red Hat Inc.

Reply via email to