Re: Properly handling conditional functions in header

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

 



Hello Evan,

* Evan Klinger wrote on Mon, May 24, 2010 at 08:55:08PM CEST:
> We have a shared library that we install which includes the header
> which contains the functions available in the library. However,
> depending upon the ./configure options, not all of the functions will
> be available and won't be compiled in. Thus we would like to remove
> these from the header file. Currently they are wrapped in #ifdefs
> which come from config.h but once the header is installed, the
> config.h is no longer necessary or used. So I'm wondering what the
> best approach is to remove the function prototypes from the header for
> the functions that were not compiled in.

One possible approach is to use a second config header.  You need to
write its template yourself (autoheader only creates that for the first
config header) and you can put only needed symbols in there, as '#undef
foo'.  With names that are specific to your package, it would be fine to
install this header.

Cheers,
Ralf

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux