autoconf
[Top][All Lists]
Advanced

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

Re: Solving the config.h nightmare ?


From: Bruce Korb
Subject: Re: Solving the config.h nightmare ?
Date: Sat, 22 Apr 2006 09:45:39 -0700
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Bob Friesenhahn wrote:
This is the approach I use for my own package:

1) Two different configuration headers are generated from configure.ac:

AC_CONFIG_HEADERS([magick/magick_config.h magick/magick_config_api.h])

the second one uses a hand-maintained template (derived from the primary one) and only includes what is absolutely necessary in order to support the library API.

2) When the software is installed, the pared down configuration header is installed where the moby one would go:

install-data-local:
$(INSTALL_HEADER) magick/magick_config_api.h $(DESTDIR)$(magickincdir)/magick_config.h

Of course the install path needs to be adjusted for the needs of your own package.

3) Step #3 is still being invented, and acts as a placeholder in case I left anything out.

This approach can still collide with configuration defines from the config headers from other headers, but the collision should usually be benign. Other approaches may add a prefix to all #define names.

Hi Bob,

I thought it was pretty well settled and pretty well defined.
I went to the trouble to actually find the macro:

http://ac-archive.sourceforge.net/guidod/ax_prefix_config_h.html

 - Bruce




reply via email to

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