[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: configure fails when CDPATH is set (ITS#551)



| Seems CDPATH interfers with configure scripts generated
| with autoconf 1.3.4.  Just checked 'configure' used

1.3.4 is libtoolish, not Autoconf.

| by autoconf-current (CVS repo) itself, seems likely it
| would suffer from same problem.

Actually, please do try the CVS Autoconf since it addresses this issue.

| The submitter suggests a simple patch which I have yet to
| test.
| 
| >Date: Wed, 31 May 2000 10:09:24 GMT
| >From: Andreas.Ley@rz.uni-karlsruhe.de
| >To: openldap-its@OpenLDAP.org
| >Subject: configure fails when CDPATH is set  (ITS#551)
| >Comment: OpenLDAP "openldap-bugs" Mailing List <http://www.OpenLDAP.org/>
| >List-Archive: <http://www.OpenLDAP.org/lists/openldap-bugs>
| >
| >Full_Name: Andreas Ley
| >Version: 1.2.10
| >OS: IRIX 6.2
| >URL: 
| >Submission from: (NULL) (129.13.64.65)
| >
| >
| >If the environment variable CDPATH is set, some operating systems print the
| >directory they changed to after executing a cd command.
| >
| >openldap's configure script contains expressions like `cd $dir && pwd`
| >which in fact gives the directory twice, garbling some sed commands later.
| >
| >One should change aclocal.m4 like this:
| >
| >*** aclocal.m4.orig     Tue Jul 20 02:20:54 1999
| >--- aclocal.m4  Wed May 31 11:06:00 2000
| >***************
| >*** 35,41 ****
| >  VERSION=[$2]
| >  AC_SUBST(VERSION)
| >  dnl test to see if srcdir already configured
| >! if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status;
| >then
| >    AC_MSG_ERROR([source directory already configured; run "make distclean"
| >there first])
| >  fi
| >  ifelse([$3],,
| >--- 35,41 ----
| >  VERSION=[$2]
| >  AC_SUBST(VERSION)
| >  dnl test to see if srcdir already configured
| >! if test "`cd $srcdir >/dev/null && pwd`" != "`pwd`" && test -f
| >$srcdir/config.status; then

Alexandre once told me this is not portable, but I don't recall why.
ISTR he once did something like this on EGCS, and someone complained,
but more details would be welcome :)

| >    AC_MSG_ERROR([source directory already configured; run "make distclean"
| >there first])
| >  fi
| >  ifelse([$3],,
| >***************
| >*** 44,50 ****
| >  AC_REQUIRE([AM_SANITY_CHECK])
| >  AC_REQUIRE([AC_ARG_PROGRAM])
| >  dnl FIXME This is truly gross.
| >! missing_dir=`cd $ac_aux_dir && pwd`
| >  AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
| >  AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
| >  AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
| >--- 44,50 ----
| >  AC_REQUIRE([AM_SANITY_CHECK])
| >  AC_REQUIRE([AC_ARG_PROGRAM])
| >  dnl FIXME This is truly gross.
| >! missing_dir=`cd $ac_aux_dir >/dev/null && pwd`
| >  AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
| >  AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
| >  AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
| >
| >or use a construct like ltconfig:
| >
| >if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
| >
| >
| >
| >
| 
|