git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "David M. Syzdek" <david.syzdek@acsalaska.net>,
	git@vger.kernel.org, jnareb@gmail.com
Subject: Re: [PATCH] autoconf: Add link tests to each AC_CHECK_FUNC() test
Date: Mon, 8 Jun 2009 23:24:55 +0200	[thread overview]
Message-ID: <20090608212454.GA834@gmx.de> (raw)
In-Reply-To: <7v4p2q3662.fsf@gitster.siamese.dyndns.org>

Hello, and please forgive me for replying to a very old thread,
<http://thread.gmane.org/gmane.comp.version-control.git/99159>.
(BTW, is that frowned upon on this list?)

* Junio C Hamano wrote on Sun, Nov 02, 2008 at 09:04:21AM CET:
> "David M. Syzdek" <david.syzdek@acsalaska.net> writes:
> > Update configure.ac to test libraries for getaddrinfo, strcasestr, memmem,
> > strlcpy, strtoumax, setenv, unsetenv, and mkdtemp.  The default compilers
> > on FreeBSD 4.9-SECURITY and FreeBSD 6.2-RELEASE-p4 do not generate warnings
> > for missing prototypes unless `-Wall' is used. This behavior renders the
> > results of AC_CHECK_FUNC() void on these platforms. The test AC_SEARCH_LIBS()
> > verifies a function is valid by linking to symbol within the system libraries.

This description does not make sense.  AC_CHECK_FUNC does not take into
account prototypes in the test; instead, it tries to link a program that
requires the function symbol.  In that matter, the patch that introduced

> It's been a looong time since I did any sizeable autoconf/m4 hacking, but
> the repetitititiveness of this patch loudly calls for a convenience macro
> of a higher order, perhaps something like:
> 
>         AC_DEFUN([GIT_CHECK_FUNC],[
>          AC_CHECK_FUNC([$1],[
>           AC_SEARCH_LIBS([$1},,
>           [$2],[$3])],
>           [$3])])
> 
> Then we can use it like:
> 
> 	GIT_CHECK_FUNC([getaddrinfo],[NO_IPV6=],[NO_IPV6=YesPlease])

(which is 1689c5de8730ea334535337a341db3c7a21ad002) is not necessary.
However, there might have been another reason altogether why David was
seeing false configure test results on his system, and it would be
interesting to know about them (both to possibly fix Autoconf, and the
comment introducing GIT_CHECK_FUNC in configure.ac).

Otherwise, I'd propose reverting the commit.

Thanks for any feedback,
Ralf

  reply	other threads:[~2009-06-08 21:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-26 11:52 [PATCH] autoconf: Add link tests to each AC_CHECK_FUNC() test David M. Syzdek
2008-11-02  8:04 ` Junio C Hamano
2009-06-08 21:24   ` Ralf Wildenhues [this message]
2009-06-09  5:30     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090608212454.GA834@gmx.de \
    --to=ralf.wildenhues@gmx.de \
    --cc=david.syzdek@acsalaska.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).