[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AM_AUX_DIR_EXPAND incorrect on MacOS X: how to fix?
From: |
Alexandre Duret-Lutz |
Subject: |
Re: AM_AUX_DIR_EXPAND incorrect on MacOS X: how to fix? |
Date: |
12 Oct 2001 14:33:28 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>> "Paul" == Paul Eggert <address@hidden> writes:
[...]
Paul> How about if we finesse the issue by not invoking pwd at all?
Paul> That will fix the portability problem, and it will also handle the
Paul> case where an ancestor of the working directory is not readable.
Paul> We could use a patch like this:
[...]
Paul> --- m4/auxdir.m4 Wed Sep 26 14:50:11 2001
Paul> +++ /tmp/auxdir.m4 Thu Oct 11 14:46:03 2001
Paul> @@ -60,5 +60,8 @@
Paul> AC_DEFUN([AM_AUX_DIR_EXPAND], [
Paul> # expand $ac_aux_dir to an absolute path
Paul> -am_aux_dir=`cd $ac_aux_dir && pwd`
Paul> +case $ac_aux_dir in
Paul> +/*) am_aux_dir=$ac_aux_dir;;
Paul> +*) am_aux_dir=$top_srcdir/$ac_aux_dir;;
Paul> +esac
Paul> ])
I think this should use $ac_top_srcdir, but I also believe
it won't always work.
If $srcdir is relative $ac_top_srcdir is set to "$ac_top_builddir$srcdir",
and in all cases $ac_aux_dir is prefixed with $srcdir.
(e.g. it is "$srcdir/mumble" when using AC_CONFIG_AUX_DIR([mumble])
So "$ac_top_srcdir/$ac_aux_dir" equals to
"$ac_top_builddir$srcdir/$srcdir/mumble", wich can't work unless
$srcdir is ".".
I think I explained something similar to this among the comments in
auxdir.m4. One idea is to strip the leading $srcdir from
$ac_aux_dir, as in
am_aux_dir=$ac_top_srcdir/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
But then we still have two "minor" problems:
1) $ac_top_srcdir does not appear to be _always_ defined in
configure (although it always is in config.status)
2) $ac_top_srcdir is not guaranteed to be absolute
--
Alexandre Duret-Lutz
Re: AM_AUX_DIR_EXPAND incorrect on MacOS X: how to fix?, Akim Demaille, 2001/10/15