[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suppressing warning AC_LANG_CONFTEST
From: |
Paolo Bonzini |
Subject: |
Re: Suppressing warning AC_LANG_CONFTEST |
Date: |
Wed, 13 Oct 2010 10:09:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3 |
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