git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's in git.git

From
Junio C Hamano <junkio@cox.net>
Date
Aug 4, 2006, 19:50 UTC
Message-ID
<7vy7u4i8lm.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vejvwjp2l.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> Running generated configure script on Cygwin just updated
> reports NO_C99_FORMAT is needed.  This is consistent with what
> Johannes confirmed.
BTW, my copy of config.mak.autogen generated on Cygwin says:
	NO_D_INO_IN_DIRENT
        NO_D_TYPE_IN_DIRENT
        NO_C99_FORMAT
        NO_STRCASESTR
	NO_OPENSSL		???
The defaults in our Makefile are:
        NO_D_INO_IN_DIRENT
	NO_D_TYPE_IN_DIRENT
        NO_STRCASESTR
        NO_STRLCPY		???
        NEEDS_LIBICONV		???
        NO_C99_FORMAT
        NO_IPV6			???
(1) configure misdetects NO_OPENSSL.  The relevant parts are:
        checking for SHA1_Init in -lssl... no
        checking for SHA1_INIT in -lcrypto... no
    but I've been building git on Cygwin without NO_OPENSSL (eh,
    that's double negation -- what I mean is I've been building
    git with -lssl just fine).  I think the function to check in
    -lcrypto should be SHA1_Init, not SHA1_INIT (trivial patch
    attached at the end).
(2) NO_STRLCPY is detected to be available by configure.  I
    think we should update the default in Makefile.
(3) NEEDS_LIBICONV is found to be unnecessary by configure, but
    the link fails like this without it:
        builtin-mailinfo.o: In function `convert_to_utf8':
        /git/builtin-mailinfo.c:539: undefined reference to `_libiconv_open'
        /git/builtin-mailinfo.c:560: undefined reference to `_libiconv'
        /git/builtin-mailinfo.c:561: undefined reference to `_libiconv_close'
        collect2: ld returned 1 exit status
(4) NO_IPV6 is not detected yet -- you should be able to detect
    this by checking for "struct addrinfo".  The compilation
    fails like this on Cygwin:
        connect.c: In function `git_tcp_connect_sock':
        connect.c:361: error: storage size of 'hints' isn't known
(Z) When configure detects some NO_XXX is unneeded, currently
    there is no way for generated config.mak.autogen to override
    the default set in Makefile.  For example, NO_STRLCPY is set
    by Makefile, and the included config.mak.autogen does not
    say anything about it even though it knows strlcpy is
    usable.  It might be better to explicitly undef unneeded
    NO_XXX in config.mak.autogen?

-- >8 -- autoconf: typofix to detect SHA1_Init in -lcrypto

---
diff --git a/configure.ac b/configure.ac
index 9ce00e9..c6d76af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,7 +155,7 @@ #
 # Define NO_OPENSSL environment variable if you do not have OpenSSL.
 # Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
 AC_CHECK_LIB([ssl], [SHA1_Init],[],
-[AC_CHECK_LIB([crypto], [SHA1_INIT],
+[AC_CHECK_LIB([crypto], [SHA1_Init],
  [GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=YesPlease)],
  [GIT_CONF_APPEND_LINE(NO_OPENSSL=YesPlease)])])
 #
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 14 in “What's in git.git”
  1. Junio C HamanoAug 4, 2006
  2. Jakub NarebskiAug 4, 2006
  3. 1/4 autoconf: Check for working mmapJakub Narebski, Aug 4, 2006
  4. Junio C HamanoAug 4, 2006
  5. Jakub NarebskiAug 4, 2006
  6. 2/4 autoconf: Check for ll hh j z t size specifiers introduced by C99Jakub Narebski, Aug 4, 2006
  7. 3/4 autoconf: Typo cleanup, reordering etc.Jakub Narebski, Aug 4, 2006
  8. 4/4 Copy description of new build configuration variables to configure.acJakub Narebski, Aug 4, 2006
  9. Johannes SchindelinAug 4, 2006
  10. Jakub NarebskiAug 4, 2006
  11. Junio C HamanoAug 4, 2006
  12. Junio C HamanoAug 4, 2006
  13. Junio C HamanoAug 4, 2006
  14. Jakub NarebskiAug 4, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.