Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

3.0.0 configure failure (bug in autoconf 2.10?)



Linux 1.3.15, gcc 2.7.0, ELF.

....
checking for tcsetpgrp... yes
checking for tcgetattr... yes
checking for strstr... yes
checking for lstat... no
checking for getlogin... yes
checking for setpgid... yes
....

The message from config.log is:
/tmp/cca194791.o(.text+0x14): undefined reference to `lstat'

The problem seems to be in the AC_CHECK_FUNCS macro.  Zsh's configure,
which says it is from autoconf 2.10, produces a conftest.c containing
the equivalent of:

char lstat();
int t() {
 lstat();
 return 0;
}

If I look at a different software package whose configure was generated by
autoconf 1.11, the code is:

int t() {
 extern char lstat(); lstat();
 return 0;
}

This latter compiles successfully and thus defines HAVE_LSTAT.

So just exactly who is wrong here?  autoconf?  gcc 2.7.0?

In any case, I suggest the following change to glob.c, just to prevent the
(@) glob modifier from producing wildly inaccurate results when configure
makes this kind of error.

--- Src/glob.c.0	Sat Jul 27 13:24:36 1996
+++ Src/glob.c	Mon Aug 19 22:39:47 1996
@@ -212,7 +212,7 @@
 			/* Toggle matching of symbolic links */
 			sense ^= 2;
 			break;
-#ifdef S_IFLNK
+#if defined(S_IFLNK) && defined(HAVE_LSTAT)
 		    case '@':
 			/* Match symbolic links */
 			func = qualmode;

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



Messages sorted by: Reverse Date, Date, Thread, Author