Es schrieb Clinton Roy: > > Guido Draheim <[EMAIL PROTECTED]> writes: > > > may I ask what you are *really* trying to achieve? Personally, I > > would like to depracate to prefix a config.h file in place, even > > more if you would really install it along with your library - I've > > seen to many include-order conflicts for this case, so please don't > > do that. > That's exactly what we're trying to do ;) > > If the config.h header is installed in $prefix/include/package/config.h, > and all it's definitions are prefixed with the package name, we think > we've done everything needed to avoid name clashes. > > > Secondly, if I read your post well, then you try to modify a file, > > but not twice, but want to rerun it. Am I confused? > Hrm. Maybe not you, but I definitely am ;) > > I would like config.h generated in the normal way via > AC_CONFIG_HEADER, then prefixed with our package name.
I see, I'm doing the same thing, and in fact, all libraries should put their headers with a subdir prefix, sadly not all of them do it, and automake's support for such a style is limited. Anyway, two ways. a) I'm using package/_config.h - this even hint the reader that this file is not a normal header (it is generated!) and it does not get confused for the standard config.h file. b) look at the argument of AC_CONFIG_HEADER - you can specify a different output-file, so that you don't need to have the two same-named. sadly, there is not enough automatism in my ac-macro that it will detect the different ac_config_header, so you have to give it as an explicit argument. so much for the problem of the same-named file, the other is... > > > Well, might be. Anyway, I don't expect things to be easy, for the > > case that the input and output file are in the same position. > That's the main problem I've had with AC_CREATE_PREFIX_CONFIG_H, it > doesn't store the output of it's sed command in a temporary file and > move it across the original, so in my case the original is lost. > > > Thirdly, you didn't mention that the ac-macro has a few optional > > arguments, one being input-file, the other being output-file, which > > you didn't mention again. What's wrong with that, and if it is not > > sufficient, why didn't you contact me? > Not contacting you directly was an oversight on my behalf. I really am > quite confused as to why prefixing of definitions isn't a standard > option already. The other problem I can see with > AC_CREATE_PREFIX_CONFIG_H is that it doesn't get put into > config.status and thus I think it would only be run once. ... the other problem is that the prefixing is not done during reconfig, and in fact, the items in my ac-macro should be appended to the config.status file, which I didn't bother to do so far, and I didn't have enough time to figure it out. > > Unfortunately when I try to use AC_CONFIG_COMMANDS to get the > prefixing done automatically on reconfiguration, I don't know what to > use as the tag to always have the command run, and it only gets run in > the initial configure invocation. > ... and btw, of course, I do not need the intermediate config.h file either, I wouldn't have a problem if s.o. could come up with a macro reading AC_PREFIXED_OUTPUT_HEADER that would be put in the place of AC_OUTPUT_HEADER today - I do only ifdefs on the prefixed stuff, not the original config stuff, so there's no need for the intermediate file ;-) cheers, -- guido http://freespace.sf.net/guidod GCS/E/S/P C++/++++$ ULHS L++w- N++@ d(+-) s+a- r+@>+++ y++ 5++X- (geekcode)