My build environment supports multiple platforms by NFS-mounting a common source tree on multiple build hosts. The directory structure looks like this:
/projects/encap-src/psg/common (source trees) /projects/encap-src/psg/<PLATFORM> (build tree for each platform) The build hosts NFS-mount the /projects filesystem from the source server. Each build host has a symlink from /usr/local/src to /projects/encap-src/psg/<PLATFORM>. As a reference case, everything works fine when I use the "real" path for the build directory: roth@coredump:/projects/encap-src/psg/common> mkdir dummy-0.1 roth@coredump:/projects/encap-src/psg/common> cd dummy-0.1/ roth@coredump:/projects/encap-src/psg/common/dummy-0.1> touch dummy.c roth@coredump:/projects/encap-src/psg/common/dummy-0.1> touch Makefile.in roth@coredump:/projects/encap-src/psg/common/dummy-0.1> cat > configure.ac AC_INIT([dummy], [0.1]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([dummy.c]) AC_PROG_CC AC_CONFIG_FILES([Makefile]) AC_OUTPUT roth@coredump:/projects/encap-src/psg/common/dummy-0.1> autoconf roth@coredump:/projects/encap-src/psg/common/dummy-0.1> autoheader autoheader: `config.h.in' is created roth@coredump:/projects/encap-src/psg/common/dummy-0.1> cd /projects/encap-src/psg/sparc-solaris8/ roth@coredump:/projects/encap-src/psg/sparc-solaris8> mkdir dummy-0.1 roth@coredump:/projects/encap-src/psg/sparc-solaris8> cd dummy-0.1/ roth@coredump:/projects/encap-src/psg/sparc-solaris8/dummy-0.1> ../../common/dummy-0.1/configure checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h The problem comes when I cd to the build directory using the /usr/local/src symlink instead of the "real" /projects/encap-src/psg/<PLATFORM> path: roth@coredump:/projects/encap-src/psg/sparc-solaris8/dummy-0.1> cd .. roth@coredump:/projects/encap-src/psg/sparc-solaris8> rm -rf dummy-0.1 roth@coredump:/projects/encap-src/psg/sparc-solaris8> cd /usr/local/src roth@coredump:/usr/local/src> mkdir dummy-0.1 roth@coredump:/usr/local/src> cd dummy-0.1 roth@coredump:/usr/local/src/dummy-0.1> ../../common/dummy-0.1/configure checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes configure: creating ./config.status ./config.status[551]: ../../common/dummy-0.1: not found ./config.status[552]: ../../common/dummy-0.1: not found config.status: creating Makefile config.status: creating config.h Lines 547 through 552 of config.status are: # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` The value of $ac_dir is ".". The purpose of the "cd $ac_dir" command is to get to the true path of ".", but it doesn't work right. I inserted this line right before the ac_abs_srcdir line: cd . && pwd Running ./config.status printed out "/usr/local/src/dummy-0.1", not "/projects/encap-src/psg/sparc-solaris8/dummy-0.1". That means that it's trying to find "/usr/local/common/dummy-0.1" (which doesn't exist), not "/projects/encap-src/psg/common/dummy-0.1" (which is what it should find). The fact that "cd ." doesn't work as expected is probably broken behavior on ksh's part, but I can reproduce this on multiple platforms. You can also see the problem from an interactive shell: roth@coredump:~> ksh $ cd /usr/local/src/dummy-0.1 $ pwd /usr/local/src/dummy-0.1 $ /bin/pwd /projects/encap-src/psg/sparc-solaris8/dummy-0.1 $ cd . $ pwd /usr/local/src/dummy-0.1 $ /bin/pwd /projects/encap-src/psg/sparc-solaris8/dummy-0.1 This is obviously something we need to work around, but I'm just not sure what the best way is to fix it. The only thing I can think of is to use "`/bin/pwd`" instead of "." for $ac_dir, but I'm not sure if that would break anything else. Any suggestions? -- Mark D. Roth <[EMAIL PROTECTED]> http://www.feep.net/~roth/