Hello, currently, configure scripts are badly detecting whether the build
is done "in place" (pwd == $srcdir).  One problem (spotted in RH bugzilla)
is this:

  $ PWD=`pwd`/ ./configure

In case of Bash, there we are hitting a bug (or feature? .. ksh also has
this one..):

  $ cd /tmp
  $ PWD=`pwd`/ sh -c pwd
  /tmp/

Note the _trailing slash_.  In this case, the $ac_pwd in config.status is
badly set and the comparison with $srcdir (comming from _AC_INIT_DIRCHECK,
comment "# When building in place, set srcdir=.") fails.

That is IMO low prio.  But there is still problem with the situation we
have symlinked the directory from somewhere.  Consider this:

  $ ls /tmp -l | grep source
  drwxrwxr-x. 2 praiskup praiskup   40 May 13 15:14 source
  lrwxrwxrwx. 1 praiskup praiskup    6 May 13 15:15 source_link -> source
  $ cd /tmp/source_link && ./configure

In this case, the detection also fails.

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
    srcdir=.
  fi

-------------------

Note that nasty things happen when there is the
'AC_CONFIG_LINKS(TESTFILE:TESTFILE)' construct used and the $srcdir is
badly detected.

Pavel


Reply via email to