bug-autoconf
[Top][All Lists]
Advanced

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

Re: Suppressing warning AC_LANG_CONFTEST


From: Eric Blake
Subject: Re: Suppressing warning AC_LANG_CONFTEST
Date: Wed, 13 Oct 2010 05:49:04 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4

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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]