[Top][All Lists]

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

Re: AC_FUNC_GETMNTENT look in libc before -lsun

From: Noah Misch
Subject: Re: AC_FUNC_GETMNTENT look in libc before -lsun
Date: Mon, 6 Dec 2004 15:20:47 -0800
User-agent: Mutt/1.5.6i

On Mon, Dec 06, 2004 at 02:14:25PM -0800, Mark D. Baushke wrote:
> Noah Misch <address@hidden> wrote:
> > It looks like the problem is somewhere else, perhaps a false positive from
> > AC_CHECK_LIB(sun).  Could you post config.log?
> I could be mistaken, but I believe the old code used
> AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS")
> which did not allow for checking to see if the library really existed or
> was even needed.

That `AC_CHECK_LIB' call runs the commands in the third argument iff linking an
object referencing `getmntent' with -lsun succeeds; Autoconf expects the link to
fail if -lsun does not exist or if getmntent remains undefined, but as Stepan
supposed, linking with a nonexistent library is not an error on your system:

configure:16535: checking for getmntent in -lsun
configure:16565: cc -o conftest -g   conftest.c -lsun  -lsun  >&5
 ldr-334 cc: CAUTION 
     File 'libsun.a' cannot be found in any of the search directories.
configure:16571: $? = 0

That is bad; it makes `configure' scripts not behave as documented.  Does your
`cc' have an option to make linking to nonexistent libraries an error?

> I belive that Paul Eggert's latest patch should do the trick, but I
> don't think I will have access to the UNICOS machine again until this
> weekend...

`configure' will still add `-lsun' for `getpwnam'.  You'll need a patch like
this, too.  Unlike Paul's patch, it's not a net improvement in its own right.

--- lib/autoconf/specific.m4~   2004-05-03 16:15:44.000000000 -0400
+++ lib/autoconf/specific.m4    2004-12-06 17:34:56.189420050 -0500
@@ -469,7 +469,7 @@ AU_DEFUN([AC_DYNIX_SEQ], [AC_FUNC_GETMNT
 # -----------
-AC_CHECK_LIB(sun, getpwnam)])
+AC_SEARCH_LIBS(getpwnam, sun)])

reply via email to

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