warnings from AC_CHECK_HEADERS because header is present but cannot be compiled...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

warnings from AC_CHECK_HEADERS because header is present but cannot be compiled...

Ed Hartnett

Howdy all!

When I run the configure for HDF5, an open-source scientific data
library, I get the following warning:

checking winsock.h presence... yes
configure: WARNING: winsock.h: present but cannot be compiled
configure: WARNING: winsock.h:     check for missing prerequisite
headers?
configure: WARNING: winsock.h: see the Autoconf documentation
configure: WARNING: winsock.h:     section "Present But Cannot Be
Compiled"
configure: WARNING: winsock.h: proceeding with the preprocessor's
result
configure: WARNING: winsock.h: in the future, the compiler will take
precedence
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to [hidden email] ##
configure: WARNING:     ## ------------------------------------ ##
checking for winsock.h... yes

1 - Is there any way to turn this warning off? I really don't want
users emailing this to the hdf support staff, since their answer is
going to be: just ignore it.

2 - Is there any way to make autoconf go with the "future" behavior
now, and say that winsock.h is not present, since it can't be
compiled?

The info pages rather imply that this test should fail, since
winsock.h is not compilable. What am I missing?

>From info:

   Previous versions of Autoconf merely checked whether the header was
accepted by the preprocessor.  This was changed because the old test was
inappropriate for typical uses.  Headers are typically used to compile,
not merely to preprocess, and the old behavior sometimes accepted
headers that clashed at compile-time.  If you need to check whether a
header is preprocessable, you can use `AC_PREPROC_IFELSE' (*note
Running the Preprocessor::).

Thanks!

Ed




--
Ed Hartnett  -- [hidden email]



_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: warnings from AC_CHECK_HEADERS because header is present but cannot be compiled...

Stepan Kasal
Hi,

On Sat, Jun 04, 2005 at 10:43:31AM -0600, Ed Hartnett wrote:
> 2 - Is there any way to make autoconf go with the "future" behavior
> now, and say that winsock.h is not present, since it can't be
> compiled?

in most cases, the header would be compilable, if some other
header would be included before it.  When this is true, the configure
script can be fixed: find out whether the prerequisite header is
available, and then add

#ifdef HAVE_FOO_H
#include <foo.h>
#endif

to the prologue of the check in question.

This is not a way to switch the check off, just to avaid trigerring it
in certain cases.

Will this solve your problem?

(If not, I hope someone else will help you here, I'm going to be offline
Jun 7 - Jun 21.)

Have a nice day,
        Stepan Kasal


_______________________________________________
Autoconf mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/autoconf
Loading...