[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reusing the product of AC_LANG_PROGRAM().
From: |
Stefano Lattarini |
Subject: |
Re: Reusing the product of AC_LANG_PROGRAM(). |
Date: |
Tue, 25 May 2010 15:58:29 +0200 |
User-agent: |
KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) |
At Tuesday 25 May 2010, Václav Haisman <address@hidden> wrote:
> Hi.
>
> Is it possible to reuse whatever AC_LANG_PROGRAM() produces?
I'm not an expert about this macro. but I'd do something like this:
m4_define([MY_PROLOGUE], [whatever])
m4_define([MY_BODY], [whatever2])
m4_define([MY_PROGRAM], [AC_LANG_PROGRAM([MY_PROLOGUE], [MY_BODY])])
...
AC_LINK_IFELSE([MY_PROGRAM], [action-if-true], [action-if-false])
if <not cross compiling>; then
AC_RUN_IFELSE([MY_PROGRAM], [action-if-true], [action-if-false])
fi
HTH,
Stefano