Determine if a kernel is built with a specific option?

Andrew Brampton brampton+freebsd-hackers at gmail.com
Mon Jan 12 06:56:24 PST 2009


2009/1/12 Eugene Grosbein <eugen at kuzbass.ru>:
>> I was wondering how a autoconf configure script can determine if the
>> kernel is built with a particular option. In this case the code I have
>> can make use of the FreeBSD polling driver, which by default isn't
>> built into a kernel. So I want my configure script to determine if the
>> kernel supports it, if so sets a #define, otherwise doesn't.
>
> You should not assume that compiled code does not need polling support
> just because _buildbox_ doesn't have it enabled in time of build.
> If the code builds here, it does not mean it will run here.
>
> Eugene Grosbein
>

Thanks for your comments Eugene. I know that is a bad assumption to
make, but I'm basically updating someone else's software which already
had that assumption for Linux.

If you were going to do this, would you make it a configure flag... ie
--enable-polling... That way it doesn't matter if the build box is
different?

thanks
Andrew


More information about the freebsd-hackers mailing list