autoconf
[Top][All Lists]
Advanced

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

Re: AC_CHECK_HEADER and kernel header files


From: Bob Proulx
Subject: Re: AC_CHECK_HEADER and kernel header files
Date: Sun, 3 Aug 2003 11:24:39 -0600
User-agent: Mutt/1.3.28i

Frank A. Uepping wrote:
> I want to check for a kernel header file with AC_CHECK_HEADER.

Since you are wanting to use a kernel header file you should know that
you are leaving portable code behind and moving into the realm of only
running on a particular type of system.  Of course a goal of autoconf
is to enable portably running on different systems.

> E.g.:
> AC_CHECK_HEADER([cdrom.h],, [AC_MSG_ERROR([cdrom.h not found])])
> ./configure CPPFLAGS=-I/usr/include/linux

I believe the proper name for cdrom.h is linux/cdrom.h.  You should
not be requiring users to pass in options such as this to your
configure run.  If you do then the default case won't work.  If you do
want to always add a directory to CPPFLAGS then you should probably be
using AM_CPPFLAGS in your automake Makefile.am file.

> gives me:
> checking cdrom.h usability... no
> checking cdrom.h presence... yes
> configure: WARNING: cdrom.h: present but cannot be compiled
> configure: WARNING: cdrom.h: check for missing prerequisite headers?
> configure: WARNING: cdrom.h: proceeding with the preprocessor's result
> configure: WARNING:     ## ------------------------------------ ##
> configure: WARNING:     ## Report this to address@hidden ##
> configure: WARNING:     ## ------------------------------------ ##
> checking for cdrom.h... yes
> 
> As you can see cdrom.h is present.
> And apparently this is a bug!?
> Is there a workaround?

It looks to me like you have a problem with the cdrom.h on your
machine.  I just tried it on my machine and it worked fine.  Can you
compile linux/cdrom.h on your machine?

Bob




reply via email to

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