On 09/28/2012 01:17 AM, Claudio Eterno wrote: > First of all I apologize for my low knowledge on autotools. These are my > first steps.. > Question: I'm developing a package for embedded application and I prepared > the configure.ac in order to do it.. > The creation of the file reaches but there are too much defines (some of > them not specifically required). Are those extra defines actually harming your project? If not, I wouldn't worry about them. But if you are trying to build your header as something that can be installed, then you are correct that extra defines should not be polluting your installed header. If you are planning on installing your bare-minimum configured header for other projects to include, I'd recommend using AC_CONFIG_HEADERS to configure multiple headers; the first header (typically named config.h) will then hold all the extra defines automatically provided by autoheader and used only internally by your project; and then list your desired header sapl/shm_apl_config.h as the second header, built from your own custom template file that has only the macros you want. > My configure.ac contain this: > AC_INIT([shmtest],[1.1.0],[my@emailcom.]) > AM_INIT_AUTOMAKE([foreign -Wall -Werror]) > AC_PROG_CC > AC_CONFIG_HEADERS([sapl/shm_apl_config.h]) That is, your current approach treated your target file as the dumping ground for ALL defines, by letting autoheader generate the template file instead of you doing it manually. My approach would be something like: AC_CONFIG_HEADERS([config.h sapl/shm_apl_config.h:sapl/shm_apl_config.h.in]) where autoheader still generates config.h.in, but where I hand-write sapl/shm_apl_config.h.in to contain just the macro names I want. -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf