On 10/12/2010 10:44 PM, Eric Blake wrote:
AC_TRY_COMPILE( [AC_LANG_PROGRAM([[ #include <stdlib.h> /* Check ... */ struct foo { char a; int x[2] __attribute__ ((__packed__)); }; ]])],
This suggestion is wrong; AC_TRY_COMPILE double quotes, so you need to switch it to AC_COMPILE_IFELSE if you want to do the above.
However, I wonder if there's an Autoconf bug or maybe your diagnosis is incorrect, because AC_TRY_COMPILE should use AC_LANG_PROGRAM:
AU_DEFUN([AC_TRY_COMPILE], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])]) Paolo