autoconf
[Top][All Lists]
Advanced

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

Re: Check if a macro has already been defined with AC_DEFINE


From: Bob Friesenhahn
Subject: Re: Check if a macro has already been defined with AC_DEFINE
Date: Mon, 2 Sep 2019 17:05:38 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Fri, 30 Aug 2019, Quaquaraqua wrote:

Hi there,
how can we check if a macro has been previously defined with AC_DEFINE ?

For instance, something like the following piece of code:

AX_OPENMP dnl it sets AC_DEFINE(HAVE_OPENMP,1) in case of success
...
m4_ifdef([[HAVE_OPENMP]], dnl how to check if HAVE_OPENMP has been defined?
   [ ... do something ... ],
   [ ... do something else ... ]
)

I'm aware that, as workaround, AX_OPENMP can take two optional arguments, 
ACTION-IF-FOUND and ACTION-IF-NOT-FOUND but I am
restricted to use them atm.

It seems that cached test results are normally stored in variables of the form "ac_cv_have_FOO". Check the generated config.status script for the exact name to test.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt



reply via email to

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