X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=c1f7751e6f8af39e812fb14963174ef8cb83d29f;hb=0881d2d1303a067a02e3811d43a1aed04a47945e;hp=cb812584cbb1f48326c4f49063baa2aee25b9288;hpb=eb0f255d6144af26361b12cb38aae9c23581a955;p=git.git diff --git a/configure.ac b/configure.ac index cb812584c..c1f7751e6 100644 --- a/configure.ac +++ b/configure.ac @@ -22,26 +22,47 @@ AC_DEFUN([GIT_CONF_APPEND_LINE], ## Checks for programs. -# Define NO_PYTHON if you want to loose all benefits of the recursive merge. +AC_MSG_NOTICE([CHECKS for programs]) +# +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. ## 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. @@ -49,31 +70,40 @@ AC_DEFUN([GIT_CONF_APPEND_LINE], ## Checks for typedefs, structures, and compiler characteristics. AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics]) - +# # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent. AC_CHECK_MEMBER(struct dirent.d_ino,[], -GIT_CONF_APPEND_LINE(NO_D_INO_IN_DIRENT=YesPlease), +[GIT_CONF_APPEND_LINE(NO_D_INO_IN_DIRENT=YesPlease)], [#include ]) - +# # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks # d_type in struct dirent (latest Cygwin -- will be fixed soonish). AC_CHECK_MEMBER(struct dirent.d_type,[], -GIT_CONF_APPEND_LINE(NO_D_TYPE_IN_DIRENT=YesPlease), +[GIT_CONF_APPEND_LINE(NO_D_TYPE_IN_DIRENT=YesPlease)], [#include ]) - +# # Define NO_SOCKADDR_STORAGE if your platform does not have struct # sockaddr_storage. AC_CHECK_TYPE(struct sockaddr_storage,[], -GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease), +[GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease)], [#include ]) ## Checks for library functions. +## (in default C library and libraries checked by AC_CHECK_LIB) +AC_MSG_NOTICE([CHECKS for library functions]) +# # Define NO_STRCASESTR if you don't have strcasestr. +AC_CHECK_FUNC(strcasestr,[], +[GIT_CONF_APPEND_LINE(NO_STRCASESTR=YesPlease)]) # # Define NO_STRLCPY if you don't have strlcpy. +AC_CHECK_FUNC(strlcpy,[], +[GIT_CONF_APPEND_LINE(NO_STRLCPY=YesPlease)]) # # Define NO_SETENV if you don't have setenv in the C library. +AC_CHECK_FUNC(setenv,[], +[GIT_CONF_APPEND_LINE(NO_SETENV=YesPlease)]) # # Define NO_MMAP if you want to avoid mmap. # @@ -148,5 +178,6 @@ GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease), AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"]) AC_OUTPUT + ## Cleanup rm -f "${config_append}"