summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 61dbb3c)
raw | patch | inline | side by side (parent: 61dbb3c)
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | |
Sun, 7 Jun 2009 05:40:29 +0000 (07:40 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 10 Jun 2009 07:08:07 +0000 (00:08 -0700) |
Check if -lresolv is needed for hstrerror; set NEEDS_RESOLV
accordingly, and substitute in config.mak.in.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
accordingly, and substitute in config.mak.in.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.mak.in | patch | blob | history | |
configure.ac | patch | blob | history |
diff --git a/config.mak.in b/config.mak.in
index 7cce0c12d507b222d47d8469abf59bf3ef9096b9..d0cd1558117bd944f63250f3f09d366d8875e62f 100644 (file)
--- a/config.mak.in
+++ b/config.mak.in
NO_EXPAT=@NO_EXPAT@
NEEDS_LIBICONV=@NEEDS_LIBICONV@
NEEDS_SOCKET=@NEEDS_SOCKET@
+NEEDS_RESOLV=@NEEDS_RESOLV@
NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT@
diff --git a/configure.ac b/configure.ac
index 4e728bca35f5f7b01188ef84df85b161266ce305..0a37af74a260a396bf2e4627f6e57786d3570f7f 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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])