git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What's in git.git
@ 2006-08-04 10:12 Junio C Hamano
  2006-08-04 10:27 ` Jakub Narebski
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Junio C Hamano @ 2006-08-04 10:12 UTC (permalink / raw)
  To: git

* The 'master' branch has these since the last announcement.
  Since it was tagged as 1.4.2-rc3, it has acquired a couple of
  further fixes.  Hopefully there won't be anything but fixes on
  this branch until the real 1.4.2 happens.

  - Documentation, usage string fixes and general clean-ups
    everywhere by Jeff King, Ramsay Allan Jones, Uwe Zeisberger,
    and Matthias Lederhofer.

  - A few more commands are made built-ins by Matthias
    Kestenholz.

  - A minor memory leak in git-tar-tree was plugged by Rene
    Scharfe.

  - Ramsay Allan Jones has introduced "NO_C99_FORMAT" Makefile
    variable to help running things with a C library that does
    not support %zu and %td format.  This would be a good target
    for autoconf work by Jakub (hint hint).

  - To make it easy to tell which side of the connection the
    errors happened while fetching/pulling, messages from the
    remote side are prefixed with "remote: ".

  - "git diff blob1 blob2" were showing the patch in reverse,
    and did not identify blob names of both sides.  Fixed.

  - "git commit -o path" from subdirectories were broken when
    git-read-tree became a built-in.  Fixed.

* The 'next' branch, in addition, has these.

  - A big gitweb clean-up series by Jakub Narebski, with help
    from Jeff King, Matthias Lederhofer and Martin Waitz to make
    run-time and build-time configuration easier.

  - Jakub Narebski made config.mak.autogen to tell where Perl
    and Python are to the build system.

  - Not-universally-liked Git.pm by Pasky with help from Dennis
    Stosberg, Johannes Schindelin, Pavel Roskin and others.
    One drawback is this pretty much makes Perl scripts that use
    Git.pm unusable with ActiveState right now.

  - A new merge strategy, merge-recur, which is a rewrite of
    merge-recursive in C, by Johannes and Alex.

  - More commands are made built-in by Matthias Kestenholz, and
    I cleaned up the build procedure for built-ins a bit.

  - New style loose objects, which use the same header format as
    in-pack objects, can be copied straight into packs when not
    deltified.  Note that new-style loose objects are not
    enabled by default yet.

  - Matthias Lederhofer introduced $GIT_PAGER environment
    variable that can specify a different pager from $PAGER.

  - I suspect Cygwin needs NO_C99_FORMAT.  Confirmation is
    appreciated.

  - Ramsay Allan Jones has one header fix to add _GNU_SOURCE,
    which helps things to compile in his environment; this needs
    to be checked to make sure it does not break others.

  - Timo Hirvonen made the parameter parsing of diff family
    saner some time ago.  Two minor changes are waiting to
    graduate to "master" after 1.4.2:

    * --name-only, --name-status, --check and -s are mutually exclusive

    * Remove awkward compatibility warts "-s".  Now -s means "do
      not output diff" everywhere, including git-diff-files.

* The 'pu' branch, in addition, has these.

  - Johannes Schindelin has a new diff option --color-words to
    use color to squash word differences into single line
    output.

  - An update to upload-pack to prevent it from going all the
    way back when the downloader has more roots than it.  Needs
    testing and comments.

  - A new merge strategy, merge-rename, which is still a
    work-in-progress to handle renames in read-tree 3-way
    merge.

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

* Re: What's in git.git
  2006-08-04 10:12 What's in git.git Junio C Hamano
@ 2006-08-04 10:27 ` Jakub Narebski
  2006-08-04 15:55 ` [PATCH 1/4] autoconf: Check for working mmap Jakub Narebski
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Jakub Narebski @ 2006-08-04 10:27 UTC (permalink / raw)
  To: git

Junio C Hamano wrote:

>   - Not-universally-liked Git.pm by Pasky with help from Dennis
>     Stosberg, Johannes Schindelin, Pavel Roskin and others.
>     One drawback is this pretty much makes Perl scripts that use
>     Git.pm unusable with ActiveState right now.

It would be nice if when compiling with NO_GIT_XS (or equivalent) defined,
Git.pm used pure Perl implementation. It would be even better if we could
avoid unnecessary code repetition.

I think it would solve (read: paper on the problem) ActiveState problem...

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

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

* [PATCH 1/4] autoconf: Check for working mmap
  2006-08-04 10:12 What's in git.git Junio C Hamano
  2006-08-04 10:27 ` Jakub Narebski
@ 2006-08-04 15:55 ` Jakub Narebski
  2006-08-04 18:56   ` Junio C Hamano
  2006-08-04 15:55 ` [PATCH 2/4] autoconf: Check for ll hh j z t size specifiers introduced by C99 Jakub Narebski
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Jakub Narebski @ 2006-08-04 15:55 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski

Use AC_FUNC_MMAP check to check if the `mmap' function exists and
works correctly.  (It only checks private fixed mapping of
already-mapped memory.)

Attention: uses implementation detail of AC_FUNC_MMAP!

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

diff --git a/configure.ac b/configure.ac
index 0a54b44..178220f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,6 +208,10 @@ AC_CHECK_FUNC(setenv,[],
 [GIT_CONF_APPEND_LINE(NO_SETENV=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().
 #
-- 
1.4.1.1

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

* [PATCH 2/4] autoconf: Check for ll hh j z t size specifiers introduced by C99
  2006-08-04 10:12 What's in git.git Junio C Hamano
  2006-08-04 10:27 ` Jakub Narebski
  2006-08-04 15:55 ` [PATCH 1/4] autoconf: Check for working mmap Jakub Narebski
@ 2006-08-04 15:55 ` Jakub Narebski
  2006-08-04 15:55 ` [PATCH 3/4] autoconf: Typo cleanup, reordering etc Jakub Narebski
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Jakub Narebski @ 2006-08-04 15:55 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski

Add custom test for checking whether formatted IO functions
(printf/scanf et.al.) support 'size specifiers' introduced by C99,
namely ll, hh, j, z, t. (representing long long int, char, intmax_t,
size_t, ptrdiff_t).

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

diff --git a/configure.ac b/configure.ac
index 178220f..1796cf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -189,6 +189,27 @@ # sockaddr_storage.
 AC_CHECK_TYPE(struct sockaddr_storage,[],
 [GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease)],
 [#include <netinet/in.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).
+# some C compilers supported these specifiers prior to C99 as an extension.
+AC_CACHE_CHECK(whether IO functions support %ll %hh %j %z %t size specifiers,
+ ac_cv_c_c99_format,
+[# Actually git uses only %z (%zu) in alloc.c, and %t (%td) in mktag.c
+AC_RUN_IFELSE(
+	[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+		[[char buf[64];
+		if (sprintf(buf, "%lld%hhd%jd%zd%td", (long long int)1, (char)2, (intmax_t)3, (size_t)4, (ptrdiff_t)5) != 5)
+		  exit(1);
+		else if (strcmp(buf, "12345"))
+		  exit(2);]])],
+	[ac_cv_c_c99_format=yes],
+	[ac_cv_c_c99_format=no])
+])
+if test $ac_cv_c_c99_format = no; then
+	GIT_CONF_APPEND_LINE(NO_C99_FORMAT=YesPlease)
+fi
 
 
 ## Checks for library functions.
-- 
1.4.1.1

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

* [PATCH 3/4] autoconf: Typo cleanup, reordering etc.
  2006-08-04 10:12 What's in git.git Junio C Hamano
                   ` (2 preceding siblings ...)
  2006-08-04 15:55 ` [PATCH 2/4] autoconf: Check for ll hh j z t size specifiers introduced by C99 Jakub Narebski
@ 2006-08-04 15:55 ` Jakub Narebski
  2006-08-04 15:55 ` [PATCH 4/4] Copy description of new build configuration variables to configure.ac Jakub Narebski
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Jakub Narebski @ 2006-08-04 15:55 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski

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

diff --git a/Makefile b/Makefile
index d662bd6..c6b62d9 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ #
 # 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).
-# some c compilers supported these specifiers prior to C99 as an extension.
+# some C compilers supported these specifiers prior to C99 as an extension.
 #
 # Define NO_STRCASESTR if you don't have strcasestr.
 #
diff --git a/configure.ac b/configure.ac
index 1796cf4..a88219a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ fi; \
 ## Site configuration
 ## --with-PACKAGE[=ARG] and --without-PACKAGE
 #
-# Define NO_SVN_TESTS if you want to skip time-consuming SVN interopability
+# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability
 # tests.  These tests take up a significant amount of the total test time
 # but are not needed unless you plan to talk to SVN repos.
 #
@@ -81,7 +81,24 @@ # not built, and you cannot push using h
 #
 # Define NO_MMAP if you want to avoid mmap.
 #
-# Define NO_PYTHON if you want to loose all benefits of the recursive merge.
+# Define SHELL_PATH to provide path to shell.
+GIT_ARG_SET_PATH(shell)
+#
+# Define PERL_PATH to provide path to Perl.
+GIT_ARG_SET_PATH(perl)
+#
+# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
+# Define PYTHON_PATH to provide path to Python.
+AC_ARG_WITH(python,[AS_HELP_STRING([--with-python=PATH], [provide PATH to python])
+AS_HELP_STRING([--no-python], [don't use python scripts])],
+ [if test "$withval" = "no"; then \
+    NO_PYTHON=YesPlease; \
+  elif test "$withval" != "yes"; then \
+    PYTHON_PATH=$withval; \
+  fi; \
+ ])
+AC_SUBST(NO_PYTHON)
+AC_SUBST(PYTHON_PATH)
 #
 ## --enable-FEATURE[=ARG] and --disable-FEATURE
 # Define COLLISION_CHECK below if you believe that SHA1's
@@ -101,27 +118,13 @@ # change being considered an inode chang
 ## Checks for programs.
 AC_MSG_NOTICE([CHECKS for programs])
 #
-GIT_ARG_SET_PATH(shell)
-GIT_ARG_SET_PATH(perl)
-AC_ARG_WITH(python,[AS_HELP_STRING([--with-python=PATH], [provide PATH to python])
-AS_HELP_STRING([--no-python], [don't use python scripts])],
- [if test "$withval" = "no"; then \
-    NO_PYTHON=YesPlease; \
-  elif test "$withval" != "yes"; then \
-    PYTHON_PATH=$withval; \
-  fi; \
- ])
-AC_SUBST(NO_PYTHON)
-AC_SUBST(PYTHON_PATH)
-
-
-#
-# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
-# Define PYTHON_PATH to provide path to Python.
 AC_PROG_CC
 #AC_PROG_INSTALL		# needs install-sh or install.sh in sources
 AC_CHECK_TOOL(AR, ar, :)
 AC_CHECK_PROGS(TAR, [gtar tar])
+#
+# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
+# Define PYTHON_PATH to provide path to Python.
 if test -z "$NO_PYTHON"; then
 	AC_PATH_PROGS(PYTHON_PATH, [python2.4 python2.3 python2 python])
 	if test -n "$PYTHON_PATH"; then
@@ -194,7 +197,7 @@ # Define NO_C99_FORMAT if your formatted
 # 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).
 # some C compilers supported these specifiers prior to C99 as an extension.
-AC_CACHE_CHECK(whether IO functions support %ll %hh %j %z %t size specifiers,
+AC_CACHE_CHECK(whether formatted IO functions support C99 size specifiers,
  ac_cv_c_c99_format,
 [# Actually git uses only %z (%zu) in alloc.c, and %t (%td) in mktag.c
 AC_RUN_IFELSE(
-- 
1.4.1.1

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

* [PATCH 4/4] Copy description of new build configuration variables to configure.ac
  2006-08-04 10:12 What's in git.git Junio C Hamano
                   ` (3 preceding siblings ...)
  2006-08-04 15:55 ` [PATCH 3/4] autoconf: Typo cleanup, reordering etc Jakub Narebski
@ 2006-08-04 15:55 ` Jakub Narebski
  2006-08-04 18:40 ` What's in git.git Johannes Schindelin
  2006-08-04 18:55 ` Jakub Narebski
  6 siblings, 0 replies; 14+ messages in thread
From: Jakub Narebski @ 2006-08-04 15:55 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski

Copy description of new build configuration variables from the
commentary in the top Makefile, namely NO_FINK and NO_DARWIN_PORTS
configuration variables, putting them in site configuration section.

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

diff --git a/configure.ac b/configure.ac
index a88219a..76bfa9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,18 @@ #
 # 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.
 #
+# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink
+# installed in /sw, but don't want GIT to link against any libraries
+# installed there.  If defined you may specify your own (or Fink's)
+# include directories and library directories by defining CFLAGS
+# and LDFLAGS appropriately.
+#
+# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,
+# have DarwinPorts installed in /opt/local, but don't want GIT to
+# link against any libraries installed there.  If defined you may
+# specify your own (or DarwinPort's) include directories and
+# library directories by defining CFLAGS and LDFLAGS appropriately.
+#
 # Define NO_MMAP if you want to avoid mmap.
 #
 # Define SHELL_PATH to provide path to shell.
-- 
1.4.1.1

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

* Re: What's in git.git
  2006-08-04 10:12 What's in git.git Junio C Hamano
                   ` (4 preceding siblings ...)
  2006-08-04 15:55 ` [PATCH 4/4] Copy description of new build configuration variables to configure.ac Jakub Narebski
@ 2006-08-04 18:40 ` Johannes Schindelin
  2006-08-04 18:55 ` Jakub Narebski
  6 siblings, 0 replies; 14+ messages in thread
From: Johannes Schindelin @ 2006-08-04 18:40 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Hi,

On Fri, 4 Aug 2006, Junio C Hamano wrote:

>   - I suspect Cygwin needs NO_C99_FORMAT.  Confirmation is
>     appreciated.

I can confirm that a just update cygwin setup needs it.

Ciao,
Dscho

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

* Re: What's in git.git
  2006-08-04 10:12 What's in git.git Junio C Hamano
                   ` (5 preceding siblings ...)
  2006-08-04 18:40 ` What's in git.git Johannes Schindelin
@ 2006-08-04 18:55 ` Jakub Narebski
  2006-08-04 19:09   ` Junio C Hamano
  6 siblings, 1 reply; 14+ messages in thread
From: Jakub Narebski @ 2006-08-04 18:55 UTC (permalink / raw)
  To: git

Junio C Hamano wrote:

>   - Ramsay Allan Jones has introduced "NO_C99_FORMAT" Makefile
>     variable to help running things with a C library that does
>     not support %zu and %td format.  This would be a good target
>     for autoconf work by Jakub (hint hint).

See [PATCH 2/4] in this thread (introductory message somehow got lost).
Testing on system which doesn't have C99 format specifiers would be
appreciated.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

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

* Re: [PATCH 1/4] autoconf: Check for working mmap
  2006-08-04 15:55 ` [PATCH 1/4] autoconf: Check for working mmap Jakub Narebski
@ 2006-08-04 18:56   ` Junio C Hamano
  2006-08-04 19:02     ` Jakub Narebski
  0 siblings, 1 reply; 14+ messages in thread
From: Junio C Hamano @ 2006-08-04 18:56 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

Jakub Narebski <jnareb@gmail.com> writes:

> Use AC_FUNC_MMAP check to check if the `mmap' function exists and
> works correctly.  (It only checks private fixed mapping of
> already-mapped memory.)

This tests something we do not really care about (we do not
mmap MAP_FIXED, and not over an already allocated space).

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

* Re: [PATCH 1/4] autoconf: Check for working mmap
  2006-08-04 18:56   ` Junio C Hamano
@ 2006-08-04 19:02     ` Jakub Narebski
  0 siblings, 0 replies; 14+ messages in thread
From: Jakub Narebski @ 2006-08-04 19:02 UTC (permalink / raw)
  To: git

Junio C Hamano wrote:

> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> Use AC_FUNC_MMAP check to check if the `mmap' function exists and
>> works correctly.  (It only checks private fixed mapping of
>> already-mapped memory.)
> 
> This tests something we do not really care about (we do not
> mmap MAP_FIXED, and not over an already allocated space).

Well, I have noticed that there exist AC_FUNC_MMAP, used it, 
then read about its limitations.

Is there any platform that passes this test, but needs NO_MMAP?
If so, then disregard this patch.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

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

* Re: What's in git.git
  2006-08-04 18:55 ` Jakub Narebski
@ 2006-08-04 19:09   ` Junio C Hamano
  2006-08-04 19:50     ` Junio C Hamano
  0 siblings, 1 reply; 14+ messages in thread
From: Junio C Hamano @ 2006-08-04 19:09 UTC (permalink / raw)
  To: Jakub Narebski, Johannes Schindelin; +Cc: git

Jakub Narebski <jnareb@gmail.com> writes:

> Junio C Hamano wrote:
>
>>   - Ramsay Allan Jones has introduced "NO_C99_FORMAT" Makefile
>>     variable to help running things with a C library that does
>>     not support %zu and %td format.  This would be a good target
>>     for autoconf work by Jakub (hint hint).
>
> See [PATCH 2/4] in this thread (introductory message somehow got lost).
> Testing on system which doesn't have C99 format specifiers would be
> appreciated.

Running generated configure script on Cygwin just updated
reports NO_C99_FORMAT is needed.  This is consistent with what
Johannes confirmed.

Thanks, both.

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

* Re: What's in git.git
  2006-08-04 19:09   ` Junio C Hamano
@ 2006-08-04 19:50     ` Junio C Hamano
  2006-08-04 20:06       ` Junio C Hamano
  2006-08-04 20:27       ` Jakub Narebski
  0 siblings, 2 replies; 14+ messages in thread
From: Junio C Hamano @ 2006-08-04 19:50 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

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)])])
 #

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

* Re: What's in git.git
  2006-08-04 19:50     ` Junio C Hamano
@ 2006-08-04 20:06       ` Junio C Hamano
  2006-08-04 20:27       ` Jakub Narebski
  1 sibling, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2006-08-04 20:06 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

Junio C Hamano <junkio@cox.net> writes:

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

I just noticed that this is not enough.  It does fix the
NO_OPENSSL problem, but I think the logic and test for ssl and
crypto in the original are the other way around.

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.

-- >8 --

diff --git a/configure.ac b/configure.ac
index 9ce00e9..fea18b6 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)])])
 #

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

* Re: What's in git.git
  2006-08-04 19:50     ` Junio C Hamano
  2006-08-04 20:06       ` Junio C Hamano
@ 2006-08-04 20:27       ` Jakub Narebski
  1 sibling, 0 replies; 14+ messages in thread
From: Jakub Narebski @ 2006-08-04 20:27 UTC (permalink / raw)
  To: git

Junio C Hamano wrote:

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

Does the following patch help?

+++
autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libc

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] 14+ messages in thread

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

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-04 10:12 What's in git.git Junio C Hamano
2006-08-04 10:27 ` Jakub Narebski
2006-08-04 15:55 ` [PATCH 1/4] autoconf: Check for working mmap Jakub Narebski
2006-08-04 18:56   ` Junio C Hamano
2006-08-04 19:02     ` Jakub Narebski
2006-08-04 15:55 ` [PATCH 2/4] autoconf: Check for ll hh j z t size specifiers introduced by C99 Jakub Narebski
2006-08-04 15:55 ` [PATCH 3/4] autoconf: Typo cleanup, reordering etc Jakub Narebski
2006-08-04 15:55 ` [PATCH 4/4] Copy description of new build configuration variables to configure.ac Jakub Narebski
2006-08-04 18:40 ` What's in git.git Johannes Schindelin
2006-08-04 18:55 ` Jakub Narebski
2006-08-04 19:09   ` Junio C Hamano
2006-08-04 19:50     ` Junio C Hamano
2006-08-04 20:06       ` Junio C Hamano
2006-08-04 20:27       ` Jakub Narebski

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 NNTP newsgroup(s).