Re: [PATCH] configure.ac: rework/fix the NEEDS_RESOLV and NEEDS_LIBGEN tests

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Tuesday, July 21, 2009 - 1:33 pm

Brandon Casey <casey@nrlssc.navy.mil> writes:


Thanks.

Instead of saying that "hstrerror not in -lc means we do have -lresolv and
the function will be found there" blindly, we may want to have a nested
check.

	AC_CHECK_LIB([c], [hstrerror], [NEEDS_RESOLV=],
       	    AC_CHECK_LIB([resolv], [hstrerror], [NEEDS_RESOLV=YesPlease]))

But we do not have any provision for the case where -lc does not have it
and -lresolv does not have it either (or -lresolv does not exist) anyway,
so we might as well go with your patch.

I take it that swapping [if-found][if-not-found] parameters is what the
autoconf documentation warns against?  That is, both -lc and -lresolv may
have it but -lresolv one may be a specialized one you would not normally
want.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[test failure] t4114 binary file becomes symlink, Nicolas Sebrecht, (Sat Jul 18, 6:45 am)
[test failure] Re: t4114 binary file becomes symlink, Nicolas Sebrecht, (Sat Jul 18, 7:16 am)
Re: [test failure] Re: t4114 binary file becomes symlink, Junio C Hamano, (Sat Jul 18, 11:46 am)
Re: [test failure] Re: t4114 binary file becomes symlink, Johannes Sixt, (Sat Jul 18, 12:06 pm)
[test failure] Re: t4114 binary file becomes symlink, Nicolas Sebrecht, (Sat Jul 18, 1:17 pm)
[test failure] Re: t4114 binary file becomes symlink, Nicolas Sebrecht, (Sat Jul 18, 1:39 pm)
[test failure] Re: t4114 binary file becomes symlink, Nicolas Sebrecht, (Sat Jul 18, 2:13 pm)
Re: [test failure] Re: t4114 binary file becomes symlink, Johannes Sixt, (Sat Jul 18, 3:03 pm)
[test failure] Re: t4114 binary file becomes symlink, Nicolas Sebrecht, (Sat Jul 18, 3:51 pm)
Re: [test failure] Re: t4114 binary file becomes symlink, Linus Torvalds, (Sat Jul 18, 4:18 pm)
Re: [test failure] Re: t4114 binary file becomes symlink, Johannes Sixt, (Sun Jul 19, 4:01 am)
[PATCH] configure: use AC_SEARCH_LIBS instead of AC_CHECK_LIB, Nicolas Sebrecht, (Sun Jul 19, 5:48 am)
Re: [test failure] Re: t4114 binary file becomes symlink, Johannes Sixt, (Mon Jul 20, 1:51 pm)
Re: [test failure] Re: t4114 binary file becomes symlink, Linus Torvalds, (Mon Jul 20, 2:56 pm)
Re: [PATCH] configure.ac: rework/fix the NEEDS_RESOLV and ..., Junio C Hamano, (Tue Jul 21, 1:33 pm)