[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with 'configure' on AIX- (tar, fileutils)

From: Paul Eggert
Subject: Re: problem with 'configure' on AIX- (tar, fileutils)
Date: Mon, 17 Sep 2001 12:52:38 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)
> Thanks for the patch.  But actually, do we have to keep this dedicated
> macro?

AC_ISC_POSIX has existed for years, and many packages use it.  At best
we could mark it as obsolescent.  But, being more conservative, I'd
prefer merely to warn that it will become obsolescent eventually, in
the documentation.

> Can't it go into streerror?

Sorry, I don't understand this comment.  Autoconf doesn't mention
strerror.  Perhaps you're thinking of a new autoconf feature that I'm
not familiar with?

Anyway, the problem here is not limited to strerror; it occurs with
other functions.  strerror is merely the canary that is sent into the

> Are there other functions that need it?

Not in autoconf itself, but lots of GNU programs use AC_ISC_POSIX:
A2ps, Bash, Bison, CVS, Diffutils, Enscript, Gzip, ...,

> Also, please, check that lib/autoscan/function or even
> lib/autoscan/libs do the right thing.

I suspect that the right thing is not to worry about these.  It's not
really a function check so lib/autoscan/function isn't right.  I don't
know how lib/autoscan/libraries is supposed to work, but ISC is wheezy
and is no longer sold and I wouldn't know how to find a copy to test
with, so I'd rather not worry about adding new checks for it.

> Apply what you think is right.

OK, done.  I applied this:

2001-09-17  Paul Eggert  <address@hidden>

        Fix bug reported by Paul Townsend on AIX with CFLAGS=-O4
        or CFLAGS=-O5.  In that case, the linker has a relaxed view of
        fatal errors, and AC_CHECK_LIB causes it to include libraries even
        when they don't exist.

        * lib/autoconf/headers.m4 (AC_HEADER_DIRENT): Use AC_SEARCH_LIBS,
        not AC_CHECK_LIB, so that we don't use -ldir or -lx if we don't
        need it.

        * lib/autoconf/specific.m4 (AC_ISC_POSIX): Replace the old, crufty
        version with the version used by fileutils 4.1, except use
        AC_SEARCH_LIBS, not AC_CHECK_LIB, so that we don't use -lcposix if
        we don't need it.
        * doc/autoconf.texi (AC_ISC_POSIX): Describe new behavior.
        Warn that this macro may become obsolescent.

Index: doc/autoconf.texi
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.528
diff -p -u -r1.528 autoconf.texi
--- doc/autoconf.texi   2001/09/05 07:06:02     1.528
+++ doc/autoconf.texi   2001/09/17 19:40:25
@@ -5186,13 +5186,13 @@ functions.  Should be called before any 
 @defmac AC_ISC_POSIX
 @acindex ISC_POSIX
address@hidden _POSIX_SOURCE
address@hidden CC
-If on a POSIXized ISC @sc{unix}, define @code{_POSIX_SOURCE} and add
address@hidden (for the @sc{gnu} C compiler) or @option{-Xp} (for other C
-compilers) to output variable @code{CC}.  This allows the use of
address@hidden facilities.  Must be called after @code{AC_PROG_CC} and
-before any other macros that run the C compiler.
address@hidden LIBS
+For @sc{interactive unix} (@sc{isc}), add @option{-lcposix} to output
+variable @code{LIBS} if necessary for @sc{posix} facilities.  Call this
+after @code{AC_PROG_CC} and before any other macros that use @sc{posix}
+interfaces.  @sc{interactive unix} is no longer sold, and Sun says that
+they will drop support for it on 2006-07-23, so this macro is becoming
 @end defmac
 @defmac AC_MINIX
Index: lib/autoconf/headers.m4
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/headers.m4,v
retrieving revision 1.14
diff -p -u -r1.14 headers.m4
--- lib/autoconf/headers.m4     2001/08/17 12:08:38     1.14
+++ lib/autoconf/headers.m4     2001/09/17 19:40:26
@@ -241,9 +241,9 @@ ac_header_dirent=$ac_hdr; break])
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
-  AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
+  AC_SEARCH_LIBS(opendir, dir)
-  AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")
+  AC_SEARCH_LIBS(opendir, x)
Index: lib/autoconf/specific.m4
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/specific.m4,v
retrieving revision 1.345
diff -p -u -r1.345 specific.m4
--- lib/autoconf/specific.m4    2001/08/22 06:25:00     1.345
+++ lib/autoconf/specific.m4    2001/09/17 19:40:26
@@ -439,29 +439,7 @@ fi
 # ------------
-if test -d /etc/conf/kconfig.d &&
-   grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1
-  AC_MSG_RESULT([yes])
-  ISC=yes # If later tests want to check for ISC.
-            [Define if you need to in order for stat and other things to
-             work.])
-  if test "$GCC" = yes; then
-    CC="$CC -posix"
-  else
-    CC="$CC -Xp"
-  fi
-  AC_MSG_RESULT([no])
-  ISC=
+AC_DEFUN([AC_ISC_POSIX], [AC_SEARCH_LIBS(strerror, cposix)])

reply via email to

[Prev in Thread] Current Thread [Next in Thread]