autoconf
[Top][All Lists]
Advanced

[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: Paul Eggert
Subject: Re: AM_AUX_DIR_EXPAND incorrect on MacOS X: how to fix?
Date: Thu, 11 Oct 2001 14:49:51 -0700 (PDT)

> From: "Kyle F. Downey" <address@hidden>
> Date: Thu, 11 Oct 2001 22:14:00 +0000 (GMT)

> am_aux_dir=`CDPATH=:; cd $ac_aux_dir &> /dev/null && pwd`

That's not portable, unfortunately.

How about if we finesse the issue by not invoking pwd at all?
That will fix the portability problem, and it will also handle the
case where an ancestor of the working directory is not readable.
We could use a patch like this:

2001-10-11  Paul Eggert  <address@hidden>

        * m4/auxdir.m4 (AM_AUX_DIR_EXPAND): Don't use pwd, as it might
        fail on any host if an ancestor directory is unreadable, and
        as the preceding 'cd' outputs a newline on MacOS X.  Instead,
        just calculate am_aux_dir directly from ac_aux_dir and top_srcdir.

--- m4/auxdir.m4        Wed Sep 26 14:50:11 2001
+++ /tmp/auxdir.m4      Thu Oct 11 14:46:03 2001
@@ -60,5 +60,8 @@
 
 AC_DEFUN([AM_AUX_DIR_EXPAND], [
 # expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+case $ac_aux_dir in
+/*) am_aux_dir=$ac_aux_dir;;
+*)  am_aux_dir=$top_srcdir/$ac_aux_dir;;
+esac
 ])



reply via email to

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