[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get AC_DEFINE to generate a macro, e.g., #define incr(x) ((x)
From: |
Fred Proctor |
Subject: |
Re: How to get AC_DEFINE to generate a macro, e.g., #define incr(x) ((x)+1) ? |
Date: |
Fri, 10 Jun 2005 08:59:05 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 |
Hi All,
Thanks for your replies on AC_DEFINE for a macro with arguments. I used
an increment function as a simple example but I don't really have a
problem with an increment function. My real problem was with the
"floorf()" math function, a float version of the double "floor()"
function in math.h. This works for me:
[AC_CHECK_DECL(floorf, ,
AH_TEMPLATE([floorf], [Math function 'floor' for floats])
AC_DEFINE([floorf(x)], [((float) floor((double) (x)))]),
[#include <math.h>])]
Thanks.
--Fred