bug-autoconf
[Top][All Lists]
Advanced

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

relocatable packages and the Autoconf manual (was Re: Make AX_DEFINE_DIR


From: Paolo Bonzini
Subject: relocatable packages and the Autoconf manual (was Re: Make AX_DEFINE_DIR obsolete?)
Date: Fri, 23 Sep 2011 08:54:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

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



reply via email to

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