> > Would there be possible to use something like this? It would pretty > > easily work-around the issue: > > > > # When building in place, set srcdir=. > > -if test "$ac_abs_confdir" = "$ac_pwd"; then > > +if test "`$readlink -f $ac_abs_confdir`" = "`$readlink -f $ac_pwd`"; then > > Sorry, but 'readlink' is not portable. > > That said, if we can come up with a PORTABLE construct that checks > whether the current directory matches srcdir, with minimal subprocesses, > I'm not opposed to a patch.
- But still, e.g. $readlink could fall-back to empty operation if no 'readlink' binary is found. - I was also thinking about `pwd -P`, or `cd -P`. These seem to be defined in POSIX. > Best may be just fixing your build environment to never try and set PWD, > since that is already a non-portable operation. Do you think that it is worth to fix this for the symlink case? I did not described it properly before: $ ls /tmp/ -l | grep source drwxrwxr-x. 2 user user 40 May 14 12:47 source lrwxrwxrwx. 1 user user 6 May 14 12:47 source_link -> source $ cd /tmp/source_link $ /tmp/source/configure In such that case, the same issue occurs .. configure fails and the 'TESTFILE' used by 'AC_CONFIG_LINKS(TESTFILE:TESTFILE)' is lost.. It is quite unpleasant and hard to recover situation (but unlikely, though). If we found a portable enough solution, it would be nice to have it fixed, imo. I could give it a and write a patch if you don't want to (if it was considered as a bit useful).