AC_C_BIGENDIAN does not work well with AX_PREFIX_CONFIG_H

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi there,

we have been bitten by the following problem.  Autoconf implements
AC_C_BIGENDIAN so that it defines WORDS_BIGENDIAN this way:

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
   significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
#  define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* #  undef WORDS_BIGENDIAN */
# endif
#endif

The spaces between `#' and `define' completely spoil AX_PREFIX_CONFIG_H
(which otherwise works very well on everything else).  Since 'PPL' is our
prefix, we want the symbol PPL_WORDS_BIGENDIAN to be defined (and not
WORDS_BIGENDIAN).

Now, I don't believe this is a bug of AX_PREFIX_CONFIG_H.  In fact we use
that feature: by leaving spaces between the `#' and the macro name we
"protect" some macros from renaming.  And, of course, it is not a bug of
Autoconf, since that spaces are normally immaterial.

Still we have a problem.  And no workaround because the obvious one
does not work (i.e., it does not undefine WORDS_BIGENDIAN):

AH_BOTTOM([
#ifdef WORDS_BIGENDIAN
# define PPL_WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
#endif
])

Perhaps this (commenting out all #undef's) is a limitation of AX_PREFIX_CONFIG_H.

Any idea how we could solve this problem?
Thanks,

   Roberto

--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@xxxxxxxxxxx


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux