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

2006-07-27 Thread Ed Hartnett
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

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

2006-07-27 Thread Andreas Schwab
Ed Hartnett <[EMAIL PROTECTED]> writes: > 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? Why do you need autoconf for that?

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

2006-07-27 Thread Keith MARSHALL
Ed Hartnett wrote: > 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!

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

2006-07-27 Thread Bob Friesenhahn
On Thu, 27 Jul 2006, Ed Hartnett wrote: 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 *

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

2006-07-27 Thread Ed Hartnett
Keith MARSHALL <[EMAIL PROTECTED]> writes: > I'm curious as to why you would expect MinGW's `sys/stat.h' to > define these? Because that's the case on every other platform I port to. Didn't mean to sound critical of mingw, which I love. > MinGW specifically targets the *native* Win32 platform.

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

2006-07-27 Thread Ed Hartnett
Bob Friesenhahn <[EMAIL PROTECTED]> writes: > On Thu, 27 Jul 2006, Ed Hartnett wrote: >> >> 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 b

AC_CHECK_FUNCS(sigsetjmp)

2006-07-27 Thread Bruce Korb
This macro does not work when the headers #define sigsetjmp to something else. I'm not finding the right alternative. Thanks - Bruce + gcc -o conftest -g -O2 conftest.c -ldl /net/simpsons/export/ws/ws0/bkorb/tmp/ccZ30ygl.o: In function `main': /local/src/ag/autogen-5.8.5pre99/_b/conftest.c:79: u

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

2006-07-27 Thread Warren Young
Ed Hartnett wrote: I'm just trying to avoid platform-specific lines of code in my C files. You've already _got_ platform-specific code. All of the S_* macros are part of the stat() mechanism, which is Unix only. Even if Windows supported it somehow, it would only be an approximation of the

AC_CHECK_FUNCS(sigsetjmp)

2006-07-27 Thread Bruce Korb
This macro does not work when the headers #define sigsetjmp to something else. I'm not finding the right alternative. Should the macro be enhanced, or is one expected to know ahead of time that "sigsetjmp" might be a macro and use a different autoconf macro? Thanks - Bruce + gcc -o conftest -g

Re: AC_CHECK_FUNCS(sigsetjmp)

2006-07-27 Thread Andreas Schwab
"Bruce Korb" <[EMAIL PROTECTED]> writes: > This macro does not work when the headers #define sigsetjmp to > something else. sigsetjmp is special since it's not required to be a normal function. You can't use AC_CHECK_FUNCS to check for it. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTEC

Re: AC_CHECK_FUNCS(sigsetjmp)

2006-07-27 Thread Thomas Dickey
On Fri, 28 Jul 2006, Andreas Schwab wrote: "Bruce Korb" <[EMAIL PROTECTED]> writes: This macro does not work when the headers #define sigsetjmp to something else. sigsetjmp is special since it's not required to be a normal function. You can't use AC_CHECK_FUNCS to check for it. That's wha

Re: AC_CHECK_FUNCS(sigsetjmp)

2006-07-27 Thread Andreas Schwab
Thomas Dickey <[EMAIL PROTECTED]> writes: > btw - does AC_CHECK_FUNCS(stat) work? stat() is required to be a > function. Yes, but many libcs are buggy. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerpri

Re: AC_CHECK_FUNCS(sigsetjmp)

2006-07-27 Thread Bruce Korb
Andreas Schwab wrote: Thomas Dickey <[EMAIL PROTECTED]> writes: btw - does AC_CHECK_FUNCS(stat) work? stat() is required to be a function. Yes, but many libcs are buggy. "not required to be a normal function" implies that it is common knowledge that everybody knows you have to roll your

Re: AC_CHECK_FUNCS(sigsetjmp)

2006-07-27 Thread Eric Blake
> > "not required to be a normal function" implies that it is > common knowledge that everybody knows you have to roll your > own AC macro? Have you tried AC_CHECK_DECLS instead? You really are checking whether sigsetjmp is declared and you can compile with it, not whether it is a function and y

Dependency of Makefile.in is not awared of

2006-07-27 Thread Tzu-Chien Chiu
Hello all. I have a strange problem on cygwin. The Makefile generated by 'configure' doesn't detect the change of Makefile.am. I have to manually remove the corresponding Makefile.in to force it to be re-generated. Examing generated Makefile I found the dependency of Makefile.in are commented ou

Re: Dependency of Makefile.in is not awared of

2006-07-27 Thread Eric Blake
> I have a strange problem on cygwin. The Makefile generated by > 'configure' doesn't detect the change of Makefile.am. I have to > manually remove the corresponding Makefile.in to force it to be > re-generated. This is probably due to automake's AM_MAINTAINER_MODE, which means you are asking on t

Re: AC_CHECK_FUNCS(sigsetjmp)

2006-07-27 Thread Bruce Korb
Eric Blake wrote: "not required to be a normal function" implies that it is common knowledge that everybody knows you have to roll your own AC macro? Have you tried AC_CHECK_DECLS instead? You really are checking whether sigsetjmp is declared and you can compile with it, not whether it is a f