On Tue, 2007-04-03 at 18:02 -0400, Bob Rossi wrote: > On Tue, Apr 03, 2007 at 04:00:20PM -0600, Ben Bergen wrote: > > does anyone know of a variable that is defined during the ./configure > > run that tells where the top level source directory is. I have tried > > $top_srcdir, but this is doesn't seem to be defined until the very > > end. I can't use the current directory because I am trying to support > > out-of-path builds. > > Hi Ben, > > I've run into the same problem, and this is what I do, > > case $target in > *-*-mingw*) > abs_top_srcdir=`cd $srcdir; pwd -W` > abs_top_builddir=`pwd -W` > ;; > *) > abs_top_srcdir=`cd $srcdir; pwd` > abs_top_builddir=`pwd` > ;; > esac > > It's probably not correct, It isn't. You will want to use $build instead of $target > but it works. If the only purpose is to access the toplevel source directory inside of configure, all this is superfluous. You can simply use $srcdir inside of configure.ac instead. If the purpose is to propagate the toplevel directory to files in subdirs through AC_SUBST, using abs_*dir's render configured build-trees to be non-relocatable (Consider logging in into the same account from different nfs-mount-points, say /nfs/<machine>/<account>) If the purpose is to access files inside of the source-tree from inside of Makefile.am, there are better ways of doing so (using relative paths, being composed of $(subdir) and $(top_srcdir)) You are probably using an antiquated autoconf. Modern autoconf's already support abs_top_srcdir and abs_top_builddir. Ralf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf