Merge branch 'mn/maint-iconv-autoconf'
authorJunio C Hamano <gitster@pobox.com>
Sun, 21 Jun 2009 04:47:22 +0000 (21:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 21 Jun 2009 04:47:22 +0000 (21:47 -0700)
* mn/maint-iconv-autoconf:
fix handling of iconv configuration options

1  2 
configure.ac
diff --combined configure.ac
index 7937e604be34eadddc314c0eff0cea226af19c9c,25fbe3bb6be2b29501965409670b066ae616c570..1885674e396d31cc625d34d029835e15b279dc8d
@@@ -385,6 -385,8 +385,8 @@@ AC_SUBST(NO_EXPAT
  # some Solaris installations).
  # Define NO_ICONV if neither libc nor libiconv support iconv.
  
+ if test -z "$NO_ICONV"; then
  GIT_STASH_FLAGS($ICONVDIR)
  
  AC_DEFUN([ICONVTEST_SRC], [
@@@ -431,6 -433,12 +433,12 @@@ GIT_UNSTASH_FLAGS($ICONVDIR
  AC_SUBST(NEEDS_LIBICONV)
  AC_SUBST(NO_ICONV)
  
+ if test -n "$NO_ICONV"; then
+     NEEDS_LIBICONV=
+ fi
+ fi
  #
  # Define NO_DEFLATE_BOUND if deflateBound is missing from zlib.
  
@@@ -467,15 -475,6 +475,15 @@@ AC_CHECK_LIB([c], [socket]
  AC_SUBST(NEEDS_SOCKET)
  test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"
  
 +#
 +# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.
 +# Notably on Solaris hstrerror resides in libresolv and on Solaris 7
 +# inet_ntop and inet_pton additionally reside there.
 +AC_CHECK_LIB([resolv], [hstrerror],
 +[NEEDS_RESOLV=],
 +[NEEDS_RESOLV=YesPlease])
 +AC_SUBST(NEEDS_RESOLV)
 +test -n "$NEEDS_RESOLV" && LIBS="$LIBS -lresolv"
  
  ## Checks for header files.
  AC_MSG_NOTICE([CHECKS for header files])
@@@ -636,12 -635,6 +644,12 @@@ AC_SUBST(SNPRINTF_RETURNS_BOGUS
  ## (in default C library and libraries checked by AC_CHECK_LIB)
  AC_MSG_NOTICE([CHECKS for library functions])
  #
 +# Define NO_LIBGEN_H if you don't have libgen.h.
 +AC_CHECK_HEADER([libgen.h],
 +[NO_LIBGEN_H=],
 +[NO_LIBGEN_H=YesPlease])
 +AC_SUBST(NO_LIBGEN_H)
 +#
  # Define NO_STRCASESTR if you don't have strcasestr.
  GIT_CHECK_FUNC(strcasestr,
  [NO_STRCASESTR=],
@@@ -692,13 -685,6 +700,13 @@@ GIT_CHECK_FUNC(mkdtemp
  [NO_MKDTEMP=YesPlease])
  AC_SUBST(NO_MKDTEMP)
  #
 +# Define NO_MKSTEMPS if you don't have mkstemps in the C library.
 +GIT_CHECK_FUNC(mkstemps,
 +[NO_MKSTEMPS=],
 +[NO_MKSTEMPS=YesPlease])
 +AC_SUBST(NO_MKSTEMPS)
 +#
 +#
  # Define NO_MMAP if you want to avoid mmap.
  #
  # Define NO_ICONV if your libc does not properly support iconv.