[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automatic setting of srcdir
From: |
Lars J. Aas |
Subject: |
Re: automatic setting of srcdir |
Date: |
Mon, 6 Nov 2000 14:10:42 +0100 |
User-agent: |
Mutt/1.2.5i |
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"
[...]
Lars J