autoconf
[Top][All Lists]
Advanced

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

can autoconf determine if a preprocessor macro is defined or not?


From: Ed Hartnett
Subject: can autoconf determine if a preprocessor macro is defined or not?
Date: Thu, 27 Jul 2006 06:45:26 -0600
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Howdy all!

To get my library build working on mingw, I had to add some defines to
one of my code files. These defines are supposed to be in sys/stats.h,
but on mingw they are not.

So I found the defines and put them in my code as below. And this
seems to work fine.

But is there an autoconf way to solve this? I can see how to use
autoconf to detect if a function can be found in a library
(AC_CHECK_LIB), but how do you check if a preprocessor symbol is
defined in a header file?

Here's what I had to add to get my code to build. I would prefer if
autoconf could add this to config.h, for example:

/* These are needed on mingw to get a dll to compile. They really
 * should be provided in sys/stats.h, but what the heck. Let's not be
 * too picky! */
#ifndef S_IRGRP
#define S_IRGRP   0000040
#endif
#ifndef S_IROTH
#define S_IROTH   0000004
#endif
#ifndef S_IWGRP
#define S_IWGRP   0000020
#endif
#ifndef S_IWOTH
#define S_IWOTH   0000002
#endif


Thanks,

Ed

-- 
Ed Hartnett  -- address@hidden






reply via email to

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