On 09/16/2011 11:42 PM, Reuben Thomas wrote:
1. Drop the AC_DEFINE item, as it's a dead end (and, being non-GCS, unusable) not a logical refinement of a developing technique (I do agree that gradually building up complex techniques, with motivation and explanation, is a good feature of GNU manuals).
If I understand correctly, the problem with AC_DEFINE is that the GCS still mention the pre-DESTDIR method of overriding the prefix (e.g., `make prefix=/tmp/staging/usr install'). I don't think any modern package would have any problem with AX_DEFINE_DIR, even though I still use the -D method in my programs.
The relocatability suggestion does have its benefits, but it also has two major drawbacks:
* the program needs a way to find the runtime prefix. There are techniques for this at least for some operating systems, but they are not documented in the manual. It would be nice to split this out of the gnulib relocatable-prog module, so that the Autoconf manual would contain at least a reference to gnulib.
* it needs to be done with care, checking if _all_ the paths used by the program are under the prefix. The reason for this is that if referring to /var as ${bindir}/../../var is totally useless, and will cause more headaches than it solves. AFAIK this is not done by the gnulib relocatable modules.
This is for example what I am doing in GNU Smalltalk. GNU Smalltalk uses bindir, datadir, libdir, libexecdir and localstatedir. If all of them are under the prefix, the executable will refer to them relative to the bindir, thus making the installation relocatable. If however even only one of them is outside the prefix, it will hard code absolute paths and configuring with --enable-relocatable will file.
Paolo