autoconf
[Top][All Lists]
Advanced

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

RE: automatic setting of srcdir


From: Bernard Dautrevaux
Subject: RE: automatic setting of srcdir
Date: Mon, 6 Nov 2000 14:29:06 +0100

> -----Original Message-----
> From: Lars J. Aas [mailto:address@hidden
> Sent: Monday, November 06, 2000 2:11 PM
> To: John A. Crow
> Cc: address@hidden
> Subject: Re: automatic setting of srcdir
> 
> 
> On Sat, Nov 04, 2000 at 07:48:33PM -0600, John A. Crow wrote:
> : All -
> : 
> : I am using autoconf-2.13. 
> : 
> : It looks to me from my experiments that by default the srcdir 
> : output variable is set to its relative path name. That is, if I do
> : 
> :    ./configure
> : 
> : I will get @srcdir@ replaced with "."; if I do for example
> : 
> :   ../testdir/configure
> : 
> : I will get @srcdir@ replaced with "../testdir".
> : 
> : Is there any way to force this variable to be replaced with
> : its absolute path name? I have seen this happen elsewhere
> : with the configure script for finger.
> : 
> : Any guidance will be appreciated.
> 
> The person running the configure script can invoke 
> /absolute/path/to/configure
> instead of ../relative/path/to/configure.  If this isn't good 
> enough (don't
> understand why you need absolute paths, though), you should 
> be able to set up
> configure.in like this to force $srcdir to become an absolute path:
> 
> AC_INIT(whatever)
> my_ac_builddir_save="`pwd`"
> cd "$srcdir"
> srcdir="`pwd`"
> cd "$my_ac_builddir_save"
> [...]
> 

Or simpler:

srcdir="`cd $srcdir; pwd`"

Regards,

        Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:    +33 (0) 1 47 68 80 80
Fax:    +33 (0) 1 47 88 97 85
e-mail: address@hidden
                address@hidden
-------------------------------------------- 



reply via email to

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