All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/5] autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libc
  2006-08-04 21:33 [PATCH 0/5] autoconf: Fixes and improvements (was: What's in git.git) Jakub Narebski
@ 2006-08-04 21:28 ` Jakub Narebski
  2006-08-04 21:28 ` [PATCH 3/5] autoconf: Fix NEEDS_SSL_WITH_CRYPTO detection Jakub Narebski
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-08-04 21:28 UTC (permalink / raw)
  To: git

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 configure.ac |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5926f3c..61c9fa3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,8 +172,7 @@ AC_CHECK_LIB([expat], [XML_ParserCreate]
 #
 # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
 AC_CHECK_LIB([c], [iconv],[],
-[AC_CHECK_LIB([iconv],[iconv],
- [GIT_CONF_APPEND_LINE(NEEDS_LIBICONV=YesPlease)],[])])
+[GIT_CONF_APPEND_LINE(NEEDS_LIBICONV=YesPlease)])
 #
 # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
 # Patrick Mauritz).
-- 
1.4.1.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/5] autoconf: Fix NEEDS_SSL_WITH_CRYPTO detection
  2006-08-04 21:33 [PATCH 0/5] autoconf: Fixes and improvements (was: What's in git.git) Jakub Narebski
  2006-08-04 21:28 ` [PATCH 2/5] autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libc Jakub Narebski
@ 2006-08-04 21:28 ` Jakub Narebski
  2006-08-04 21:29 ` [PATCH 1/5] autoconf: typofix to detect SHA1_Init in -lcrypto Jakub Narebski
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-08-04 21:28 UTC (permalink / raw)
  To: git

>From 7829f2f76c429594602d845168841d378d269fba Mon Sep 17 00:00:00 2001
From: Junio C Hamano <junkio@cox.net>
Date: Fri, 4 Aug 2006 13:06:33 -0700
Subject: [PATCH 3/5] autoconf: Fix NEEDS_SSL_WITH_CRYPTO detection

NEEDS_SSL_WITH_CRYPTO means you cannot just say "-lcrypto" to
use SHA1 stuff, but need to say "-lcrypto -lssl", so the test
should say "if we can get away with -lcrypto, we are happy,
otherwise if we need -lssl, then say NEEDS_SSL_WITH_CRYPTO,
otherwise we cannot use OpenSSL so say NO_OPENSSL", or something
like that.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 configure.ac |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 61c9fa3..a49bd1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,8 +154,8 @@ AC_MSG_NOTICE([CHECKS for libraries])
 #
 # 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],[],
+[AC_CHECK_LIB([ssl], [SHA1_Init],
  [GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=YesPlease)],
  [GIT_CONF_APPEND_LINE(NO_OPENSSL=YesPlease)])])
 #
-- 
1.4.1.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 1/5] autoconf: typofix to detect SHA1_Init in -lcrypto
  2006-08-04 21:33 [PATCH 0/5] autoconf: Fixes and improvements (was: What's in git.git) Jakub Narebski
  2006-08-04 21:28 ` [PATCH 2/5] autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libc Jakub Narebski
  2006-08-04 21:28 ` [PATCH 3/5] autoconf: Fix NEEDS_SSL_WITH_CRYPTO detection Jakub Narebski
@ 2006-08-04 21:29 ` Jakub Narebski
  2006-08-04 21:30 ` [PATCH 4/5] autoconf: Double check for IPv6 support Jakub Narebski
  2006-08-04 21:43 ` [PATCH 5/5] autoconf: Unset NO_STH and NEED_STH when it is detected not needed Jakub Narebski
  4 siblings, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-08-04 21:29 UTC (permalink / raw)
  To: git

>From 15951e524df655d12b2bc42b1cf0a4be39fc3278 Mon Sep 17 00:00:00 2001
From: Junio C Hamano <junkio@cox.net>
Date: Fri, 4 Aug 2006 22:17:35 +0200
Subject: [PATCH 1/5] autoconf: typofix to detect SHA1_Init in -lcrypto

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 76bfa9d..5926f3c 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)])])
 #
-- 
1.4.1.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] autoconf: Double check for IPv6 support
  2006-08-04 21:33 [PATCH 0/5] autoconf: Fixes and improvements (was: What's in git.git) Jakub Narebski
                   ` (2 preceding siblings ...)
  2006-08-04 21:29 ` [PATCH 1/5] autoconf: typofix to detect SHA1_Init in -lcrypto Jakub Narebski
@ 2006-08-04 21:30 ` Jakub Narebski
  2006-08-04 21:43 ` [PATCH 5/5] autoconf: Unset NO_STH and NEED_STH when it is detected not needed Jakub Narebski
  4 siblings, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-08-04 21:30 UTC (permalink / raw)
  To: git

Check for IPv6 support, first by checking if "struct addrinfo" exists,
then by checking if there is getaddrinfo() in standard libraries.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 configure.ac |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index a49bd1f..6557bd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,6 +204,13 @@ AC_CHECK_TYPE(struct sockaddr_storage,[]
 [GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease)],
 [#include <netinet/in.h>])
 #
+# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
+AC_CHECK_TYPE(struct addrinfo,[],
+[GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)],
+[#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>])
+#
 # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.)
 # do not support the 'size specifiers' introduced by C99, namely ll, hh,
 # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t).
@@ -242,14 +249,16 @@ # Define NO_SETENV if you don't have set
 AC_CHECK_FUNC(setenv,[],
 [GIT_CONF_APPEND_LINE(NO_SETENV=YesPlease)])
 #
+# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
+AC_CHECK_FUNC(getaddrinfo,[],
+[GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)])
+#
 # Define NO_MMAP if you want to avoid mmap.
 AC_FUNC_MMAP
 if test $ac_cv_func_mmap_fixed_mapped != yes; then
 	GIT_CONF_APPEND_LINE(NO_MMAP=YesPlease)
 fi
 #
-# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
-#
 # Define NO_ICONV if your libc does not properly support iconv.
 
 
-- 
1.4.1.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 0/5] autoconf: Fixes and improvements (was: What's in git.git)
@ 2006-08-04 21:33 Jakub Narebski
  2006-08-04 21:28 ` [PATCH 2/5] autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libc Jakub Narebski
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-08-04 21:33 UTC (permalink / raw)
  To: git

Junio C Hamano wrote:

> (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).

Should be corrected by patches 1 and 3 by Junio C Hamano.
I had just not understood meaning of NEEDS_SSL_WITH_CRYPTO 
variable.

> (2) NO_STRLCPY is detected to be available by configure.  I
>     think we should update the default in Makefile.

Not adressed.

> (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

Check if patch 2 corrects this error. Patch 5 does the same as patch 2 
for NEEDS_SOCKET due to cleanup during making this change.

> (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

Patch 4 adresses this. Perhas one of the checks can be dropped (leaving 
easier or faster one).

> (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?

Patch 5 tries to address this. Additionally it can be easily seen what 
was detested... but it is somewhat harder to see which variables are 
set among unset ones.

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 5/5] autoconf: Unset NO_STH and NEED_STH when it is detected not needed
  2006-08-04 21:33 [PATCH 0/5] autoconf: Fixes and improvements (was: What's in git.git) Jakub Narebski
                   ` (3 preceding siblings ...)
  2006-08-04 21:30 ` [PATCH 4/5] autoconf: Double check for IPv6 support Jakub Narebski
@ 2006-08-04 21:43 ` Jakub Narebski
  4 siblings, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-08-04 21:43 UTC (permalink / raw)
  To: git

When configure detects some NO_XXX or NEEDS_XXX is unneeded, unset
this variable (actually set it to empty string).  This allow
autodetection to override the default set in Makefile.

Suggested-by: Junio C Hamano <junkio@cox.net>

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 configure.ac |   49 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6557bd2..74984e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,31 +154,36 @@ AC_MSG_NOTICE([CHECKS for libraries])
 #
 # 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([crypto], [SHA1_Init],[],
+AC_CHECK_LIB([crypto], [SHA1_Init],
+[GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=)],
 [AC_CHECK_LIB([ssl], [SHA1_Init],
- [GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=YesPlease)],
+ [GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=YesPlease)
+  GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=)],
  [GIT_CONF_APPEND_LINE(NO_OPENSSL=YesPlease)])])
 #
 # Define NO_CURL if you do not have curl installed.  git-http-pull and
 # git-http-push are not built, and you cannot use http:// and https://
 # transports.
-AC_CHECK_LIB([curl], [curl_global_init],[],
+AC_CHECK_LIB([curl], [curl_global_init],
+[GIT_CONF_APPEND_LINE(NO_CURL=)],
 [GIT_CONF_APPEND_LINE(NO_CURL=YesPlease)])
 #
 # Define NO_EXPAT if you do not have expat installed.  git-http-push is
 # not built, and you cannot push using http:// and https:// transports.
-AC_CHECK_LIB([expat], [XML_ParserCreate],[],
+AC_CHECK_LIB([expat], [XML_ParserCreate],
+[GIT_CONF_APPEND_LINE(NO_EXPAT=)],
 [GIT_CONF_APPEND_LINE(NO_EXPAT=YesPlease)])
 #
 # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
-AC_CHECK_LIB([c], [iconv],[],
+AC_CHECK_LIB([c], [iconv],
+[GIT_CONF_APPEND_LINE(NEEDS_LIBICONV=)],
 [GIT_CONF_APPEND_LINE(NEEDS_LIBICONV=YesPlease)])
 #
 # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
 # Patrick Mauritz).
-AC_CHECK_LIB([c], [socket],[],
-[AC_CHECK_LIB([socket],[socket],
- [GIT_CONF_APPEND_LINE(NEEDS_SOCKET=YesPlease)],[])])
+AC_CHECK_LIB([c], [socket],
+[GIT_CONF_APPEND_LINE(NEEDS_SOCKET=)],
+[GIT_CONF_APPEND_LINE(NEEDS_SOCKET=YesPlease)])
 
 
 ## Checks for header files.
@@ -188,24 +193,28 @@ ## Checks for typedefs, structures, and 
 AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics])
 #
 # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
-AC_CHECK_MEMBER(struct dirent.d_ino,[],
+AC_CHECK_MEMBER(struct dirent.d_ino,
+[GIT_CONF_APPEND_LINE(NO_D_INO_IN_DIRENT=)],
 [GIT_CONF_APPEND_LINE(NO_D_INO_IN_DIRENT=YesPlease)],
 [#include <dirent.h>])
 #
 # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
 # d_type in struct dirent (latest Cygwin -- will be fixed soonish).
-AC_CHECK_MEMBER(struct dirent.d_type,[],
+AC_CHECK_MEMBER(struct dirent.d_type,
+[GIT_CONF_APPEND_LINE(NO_D_TYPE_IN_DIRENT=)],
 [GIT_CONF_APPEND_LINE(NO_D_TYPE_IN_DIRENT=YesPlease)],
 [#include <dirent.h>])
 #
 # Define NO_SOCKADDR_STORAGE if your platform does not have struct
 # sockaddr_storage.
-AC_CHECK_TYPE(struct sockaddr_storage,[],
+AC_CHECK_TYPE(struct sockaddr_storage,
+[GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=)],
 [GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease)],
 [#include <netinet/in.h>])
 #
 # Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
-AC_CHECK_TYPE(struct addrinfo,[],
+AC_CHECK_TYPE(struct addrinfo,
+[GIT_CONF_APPEND_LINE(NO_IPV6=)],
 [GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)],
 [#include <sys/types.h>
 #include <sys/socket.h>
@@ -230,6 +239,8 @@ AC_RUN_IFELSE(
 ])
 if test $ac_cv_c_c99_format = no; then
 	GIT_CONF_APPEND_LINE(NO_C99_FORMAT=YesPlease)
+else
+	GIT_CONF_APPEND_LINE(NO_C99_FORMAT=)
 fi
 
 
@@ -238,25 +249,31 @@ ## (in default C library and libraries c
 AC_MSG_NOTICE([CHECKS for library functions])
 #
 # Define NO_STRCASESTR if you don't have strcasestr.
-AC_CHECK_FUNC(strcasestr,[],
+AC_CHECK_FUNC(strcasestr,
+[GIT_CONF_APPEND_LINE(NO_STRCASESTR=)],
 [GIT_CONF_APPEND_LINE(NO_STRCASESTR=YesPlease)])
 #
 # Define NO_STRLCPY if you don't have strlcpy.
-AC_CHECK_FUNC(strlcpy,[],
+AC_CHECK_FUNC(strlcpy,
+[GIT_CONF_APPEND_LINE(NO_STRLCPY=)],
 [GIT_CONF_APPEND_LINE(NO_STRLCPY=YesPlease)])
 #
 # Define NO_SETENV if you don't have setenv in the C library.
-AC_CHECK_FUNC(setenv,[],
+AC_CHECK_FUNC(setenv,
+[GIT_CONF_APPEND_LINE(NO_SETENV=)],
 [GIT_CONF_APPEND_LINE(NO_SETENV=YesPlease)])
 #
 # Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
-AC_CHECK_FUNC(getaddrinfo,[],
+AC_CHECK_FUNC(getaddrinfo,
+[GIT_CONF_APPEND_LINE(NO_IPV6=)],
 [GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)])
 #
 # Define NO_MMAP if you want to avoid mmap.
 AC_FUNC_MMAP
 if test $ac_cv_func_mmap_fixed_mapped != yes; then
 	GIT_CONF_APPEND_LINE(NO_MMAP=YesPlease)
+else
+	GIT_CONF_APPEND_LINE(NO_MMAP=)
 fi
 #
 # Define NO_ICONV if your libc does not properly support iconv.
-- 
1.4.1.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-04 21:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-04 21:33 [PATCH 0/5] autoconf: Fixes and improvements (was: What's in git.git) Jakub Narebski
2006-08-04 21:28 ` [PATCH 2/5] autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libc Jakub Narebski
2006-08-04 21:28 ` [PATCH 3/5] autoconf: Fix NEEDS_SSL_WITH_CRYPTO detection Jakub Narebski
2006-08-04 21:29 ` [PATCH 1/5] autoconf: typofix to detect SHA1_Init in -lcrypto Jakub Narebski
2006-08-04 21:30 ` [PATCH 4/5] autoconf: Double check for IPv6 support Jakub Narebski
2006-08-04 21:43 ` [PATCH 5/5] autoconf: Unset NO_STH and NEED_STH when it is detected not needed Jakub Narebski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.