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

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

 



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
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux