From: Junio C Hamano Date: Sun, 21 Jun 2009 04:47:22 +0000 (-0700) Subject: Merge branch 'mn/maint-iconv-autoconf' X-Git-Tag: v1.6.4-rc0~47 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/974e6e42f7a66b69bd684af4f637ab064acfdf92?ds=inline;hp=-c Merge branch 'mn/maint-iconv-autoconf' * mn/maint-iconv-autoconf: fix handling of iconv configuration options --- 974e6e42f7a66b69bd684af4f637ab064acfdf92 diff --combined configure.ac index 7937e604be,25fbe3bb6b..1885674e39 --- a/configure.ac +++ b/configure.ac @@@ -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.