[GRASS5] 5.3: shared libs and test in configure

Glynn Clements glynn.clements at virgin.net
Fri Jan 9 13:37:38 EST 2004

Markus Neteler wrote:

> Here an example that the test
>   if test "$SRCDIR" = "$DSTDIR" ; then
>     { echo "configure: error: ***  Build directory should not be the same as source \
> can fail:
> SRCDIR: /hardmnt/thuille1/ssi/cvsgrass_exp
> DSTDIR: /ssi0/ssi/neteler/cvsgrass_exp
> The situation is that I have changed into the source code
> /ssi0/ssi/neteler/cvsgrass_exp/ directory via soft-link:
> cd /ssi0/ssi/neteler/cvsgrass_exp/
> thuille:cvsgrass_exp[304.48] pwd
> /ssi0/ssi/neteler/cvsgrass_exp
> thuille:cvsgrass_exp[305.49] /bin/pwd
> /hardmnt/thuille1/ssi/cvsgrass_exp

Right. I appear to have been distracted by the fact that one of the
three cases uses $pwd (which will be set to "/bin/pwd"); however, the
other two just use "pwd" which will be the shell's built-in:

	AC_PATH_PROG(pwd, pwd, pwd)
	AC_MSG_CHECKING(for source directory)
	if test -z "$srcdir" ; then
	  SRCDIR=`(cd "$srcdir" ; $pwd)`
	AC_MSG_CHECKING(for build directory)

For the $SRCDIR = $DSTDIR check to work correctly, we need to use $pwd
in all three cases. I'll fix this.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list