Paul Eggert | 1 Aug 2002 16:20

Re: Problem with symlinks and VPATH Builds

> From: "Mark D. Roth" <roth <at> feep.net>
> Date: Thu, 25 Jul 2002 08:25:39 -0500
> 
> The -P option isn't listed in the ksh docs under Solaris or AIX.
> Only OpenBSD seems to document this.

It's also documented in Bash 2.05b.  This feature was recently added
to Bash (presumably in response to POSIX 1003.1-2001 requiring it), so
newer versions of Bash will also have the problem.  I was using an
older Bash when I couldn't reproduce your original bug report.

> > So it appears to me that the "proper" fix is to try "cd -P DIR" first,
> > and to fall back on plain "cd DIR" if that doesn't work.
> 
> Sounds good.  Please see the attached patch.

On second thought, I don't think this is wise.  There is at least one
other instance of "cd $foo && pwd" in Autoconf and the Autoconf manual
talks about this idiom so that we can expect to see it in user code
too.  Even if we work around these two instances of the problem, other
instances will remain.

The underlying problem here is that $ac_top_srcdir is bogus, because
"cd $ac_top_srcdir" and "ls $ac_top_srcdir" refer to different
directories in POSIX 1003.1-2001 shells.  How about if we merely
detect this problem and ask the invoker of "configure" to fix it?
We should also document the problem, of course.

Here is a proposed patch along these lines.  The doc fix also clears
up some of the CDPATH confusion, and mentions the PWD problem.
(Continue reading)

Alexandre Duret-Lutz | 2 Aug 2002 15:12
Picon
Picon
Picon

Re: Problem with symlinks and VPATH Builds

>>> "Paul" == Paul Eggert <eggert <at> twinsun.com> writes:

[...]

 Paul> Simplify the description of $CDPATH.

:( :( :(

Why replace an illustrated discussion of the isse with `Autoconf
will get it right for you.'?  Why not showing people the
commands they should use outside Autoconf?

I tend to use this part of the Autoconf manual as a bible for
shell portability in general, not only for configure
portability.  I like to read the full solution in the manual,
with comments explaining why other solutions wouldn't work.
Removing this history seems a great lost to me.

Similarly, I used to open the Autoconf manual to copy'n'paste the
expr-emulation of dirname every times I needed it in a script.
Today this has been replaced with `use AS_DIRNAME', with no
explanation why the old "expr" command is not enough.  I agree
this might be a good occasion to start using `autom4te -l M4sh';
however my point is that valuable information is being removed
from the manual.

[...]

--

-- 
Alexandre Duret-Lutz
(Continue reading)

Kevin Ryde | 3 Aug 2002 02:09
Picon
Picon

cc default output doco

I'd like to suggest listing the possible cc default outputs in the
manual.  This is more or less just collected up from
_AC_COMPILER_EXEEXT_DEFAULT.

        * ccdefault/autoconf.texi (Limitations of Usual Tools): Notes on "cc"
        default output.

Attachment (autoconf.texi.cc-default.diff): application/x-patch, 559 bytes
Mark D. Roth | 3 Aug 2002 22:01

Re: Site Macro Directory

Sorry for the delay in responding.  This has been an unusually busy
week...

On Tue Jul 30 18:58 2002 +0200, Alexandre Duret-Lutz wrote:
> I second Akim here.  A package ought to come with its entire
> source code, including the source for things like `configure'.
> That's configure.ac plus any non-standard macros.

How is this different from a package that uses an external library?
If I'm maintaining a package that uses a library that someone else
wrote, I'm not going to include a copy of the library's source code in
the source distribution of my package.  It's much more efficient to
simply point the user at the home site of the library and tell them
that they need to install it before they can build my package.

> Supporting a Site Macro directory in Autoconf seems a good step
> towards the elimination of `aclocal' (from Automake), but
> probably it should not be the role of `autoconf' to scan this
> directory.
> 
> I like the idea Akim presented earlier in this thread: having a
> separate tool (an aclocal replacement) that imports all needed
> macros in the current project.  

If it's absolutely necessary to include these macros in the package
that uses them, I submit two things for consideration.

First, this functionality SHOULD be provided by autoconf rather than
by yet another external tool.  (It can be done in a "preprocessing"
phase before autom4te is invoked, but it should happen automatically
(Continue reading)

Mark D. Roth | 3 Aug 2002 22:25

Re: Problem with symlinks and VPATH Builds

On Thu Aug 01 07:20 2002 -0700, Paul Eggert wrote:
> > > So it appears to me that the "proper" fix is to try "cd -P DIR" first,
> > > and to fall back on plain "cd DIR" if that doesn't work.
> > 
> > Sounds good.  Please see the attached patch.
> 
> On second thought, I don't think this is wise.  There is at least one
> other instance of "cd $foo && pwd" in Autoconf and the Autoconf manual
> talks about this idiom so that we can expect to see it in user code
> too.  Even if we work around these two instances of the problem, other
> instances will remain.
> 
> The underlying problem here is that $ac_top_srcdir is bogus, because
> "cd $ac_top_srcdir" and "ls $ac_top_srcdir" refer to different
> directories in POSIX 1003.1-2001 shells.  How about if we merely
> detect this problem and ask the invoker of "configure" to fix it?
> We should also document the problem, of course.

I agree that we ought to document this problem so that user macros are
updated to deal with it.  However, that doesn't prevent us from fixing
autoconf to do the right thing.  Making the invoker of configure deal
with it would be very inconvenient and wouldn't really gain us
anything.

On Thu Aug 01 13:46 2002 -0400, Eric Siegerman wrote:
> Hmmm, time for a CANONICALIZE_PATHNAME macro?  Bonus: it could be
> made to work with pathnames other than directories.

This is a really good idea.  Adding this macro would kill two birds
with one stone: it would provide a way for user macros to handle the
(Continue reading)

Kevin Ryde | 9 Aug 2002 02:39
Picon
Picon

makeinfo <at> center workaround

	* centre/autoconf.texi (Quotation Rule Of Thumb) [ifinfo]: Add  <at> sp 1
	after  <at> center to help makeinfo 4.2 get the formatting right.

Attachment (autoconf.texi.center.diff): application/x-patch, 477 bytes
Rainer Orth | 16 Aug 2002 22:50
Picon
Picon

PATCH: Fix massive IRIX 6 testsuite failures with perl 5.8.0

Building and checking autoconf 2.53 on IRIX 6.2 with perl 5.8.0 revealed
many testsuite failues (131 out of 163 ;-).  An example is

% ./testsuite -v -d 3
## ----------------------------- ##
## GNU Autoconf 2.53 test suite. ##
## ----------------------------- ##
3. tools.at:122: testing autoconf --trace: user macros...
tools.at:167: autoconf -t TRACE1 -t TRACE2
tools.at:190: autoconf -t TRACE1:'
[$1], [$2], [$3].'
--- /dev/null   Fri Aug 16 21:25:12 2002
+++ /vol/gcc/obj/autoconf-2.53-bug/tests/testsuite.dir/at-stderr        Fri Aug 16 21:25:13 2002
 <at>  <at>  -0,0 +1,2  <at>  <at> 
+autom4te: cannot do autom4te.cache/requests: No such file or directory
+ at /vol/gcc/obj/autoconf-2.53-bug/bin/autom4te line 1111

This happens although a system call trace with par clearly shows that
autom4te.cache/requests has been opened and read successfully.

I could finally trace this down to a bug in autom4te: Request::load tested
$! to determine if "do" couldn't open $file.  As in C (testing errno
without a previous syscall failure return gives you the error code from the
last failed system call) this is wrong: as explained in perlfunc(1), the
correct idiom to test for "do" read failures is to test whether the "do"
return value is defined:

             If "do" cannot read the file, it returns undef and
             sets $! to the error.

(Continue reading)

Paul Eggert | 18 Aug 2002 02:50

Re: 'fc' program and autoconf

> From: "Steven G. Johnson" <stevenj <at> alum.mit.edu>
> Date: Sat, 17 Aug 2002 18:04:45 -0400
> 
> 2) Remove 'fc' from the list of names checked, letting the user specify 
> it manually with F77=fc if necessary.  (fc was in the "historical" 
> autoconf 2.13 list, if I remember correctly.  I've never actually seen a 
> program of this name myself.  Anyone?)

Thanks for the suggestion.  I think the fc Fortran compiler is long
dead, so I installed this patch.

2002-08-17  Paul Eggert  <eggert <at> twinsun.com>

	* lib/autoconf/fortran.m4 (AC_PROG_F77): Remove fc from the
	default list of compilers to try, since it was long ago superseded
	by the ksh fc builtin.  Suggested by Steven G. Johnson.

Index: fortran.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/fortran.m4,v
retrieving revision 1.159
retrieving revision 1.160
diff -p -u -r1.159 -r1.160
--- fortran.m4	22 May 2002 23:35:54 -0000	1.159
+++ fortran.m4	18 Aug 2002 00:47:25 -0000	1.160
 <at>  <at>  -229,7 +229,7  <at>  <at>  AU_DEFUN([ac_cv_prog_g77],
 #  2. Good/tested native compilers, bad/untested native compilers
 #  3. Wrappers around f2c go last.
 #
-# `fort77' and `fc' are wrappers around `f2c', `fort77' being better.
(Continue reading)

Steven G. Johnson | 18 Aug 2002 03:12
Picon

Re: 'fc' program and autoconf

On Sat, 17 Aug 2002, Paul Eggert wrote:
> > 2) Remove 'fc' from the list of names checked, letting the user specify 
> > it manually with F77=fc if necessary.  (fc was in the "historical" 
> > autoconf 2.13 list, if I remember correctly.  I've never actually seen a 
> > program of this name myself.  Anyone?)
> 
> Thanks for the suggestion.  I think the fc Fortran compiler is long
> dead, so I installed this patch.

Perhaps I spoke too soon?  It turns out that 'fc' is the name of the
(native) Fortran compiler by Convex (now HP) on the HP Exemplar SPP.

http://archive.ncsa.uiuc.edu/General/Consulting/FAQ/Exemplar/ProgLibSoft/convex/
http://www.scripps.edu/rc/Spp/spp_compiler.html

I suppose one could argue that ksh is more common than HP Exemplars, but I
feel a bit guilty at taking the easy way out.

Steven

Paul Eggert | 18 Aug 2002 03:31

Re: 'fc' program and autoconf

> Date: Sat, 17 Aug 2002 21:12:33 -0400 (EDT)
> From: "Steven G. Johnson" <stevenj <at> ab-initio.mit.edu>

> > Thanks for the suggestion.  I think the fc Fortran compiler is long
> > dead, so I installed this patch.
> 
> Perhaps I spoke too soon?  It turns out that 'fc' is the name of the
> (native) Fortran compiler by Convex (now HP) on the HP Exemplar SPP.

If that's the only fc we have to worry about, we should be OK.  The
Convex Exemplar is obsolete, and other than a hobbyist picking one up
at a salvage auction I don't think we'll ever run into anyone actually
booting one.  (Next you'll be finding old copies of manuals for the
Kendall Square KSR-1.  :-)

In the unlikely case that someone still actually uses such a beast,
they'll almost certainly have HP's Fortran as well (called "f77"), and
since f77 preceded fc in the list we can safely omit the fc.


Gmane