On 10/13/2010 02:09 AM, Paolo Bonzini wrote:
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.
You are correct; I missed that in my review - and the fact that AC_TRY_COMPILE adds the extra layer of quoting behind your back is why it is deprecated these days. Only the *IFELSE variants need the addition of the AC_LANG_PROGRAM.
However, I wonder if there's an Autoconf bug or maybe your diagnosis is incorrect, because AC_TRY_COMPILE should use AC_LANG_PROGRAM:
Again correct - AC_TRY_COMPILE is immune to the missing AC_LANG_PROGRAM warning.
-- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
