summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-07-08 23:07:12 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-09 02:20:54 -0700
commitebdf53210ca30eaaa6cf5f555200678bf5f256ac (patch)
treec89fecbac0b4c19dece611ec53125d8c7aa7c3c7 /configure.ac
parent1bbbadbc2c32d1a6d0e97713e4f6e417daa72759 (diff)
downloadgit-ebdf53210ca30eaaa6cf5f555200678bf5f256ac.tar.gz
autoconf: Checks for libraries
./configure script checks now if the following libraries are present: * -lssl for SHA1_Init (NO_OPENSSL) * -lcurl for curl_easy_setopt (NO_CURL) * -lexpat for XML_ParserCreate (NO_EXPAT) It also checks if adding the following libraries are needed: * -lcrypto for SHA1_Init (NEEDS_SSL_WITH_CRYPTO) * -liconv for iconv (NEEDS_LIBICONV) * -lsocket for socket (NEEDS_SOCKET) Policy: we check also if NEEDS_LIBRARY libraries are present, even if there is no NO_LIBRARY variable. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 21 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index ab6a77ad5c..d938546940 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,22 +26,36 @@ AC_DEFUN([GIT_CONF_APPEND_LINE],
## Checks for libraries.
+AC_MSG_NOTICE([CHECKS for libraries])
+
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
-# This also implies MOZILLA_SHA1.
-#
+# Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
+AC_CHECK_LIB([ssl], [SHA1_Init],[],
+[AC_CHECK_LIB([crypto], [SHA1_INIT],
+ GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=YesPlease),
+ 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],[],
+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.
-#
-# Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
-#
+AC_CHECK_LIB([expat], [XML_ParserCreate],[],
+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([iconv],[iconv],
+ 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),[])])
## Checks for header files.