public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail•com>
To: git@vger•kernel.org
Subject: [RFC/PATCH] autoconf: Use autoconf to check for some types and library functions
Date: Thu, 29 Jun 2006 15:36:17 +0200	[thread overview]
Message-ID: <200606291536.18667.jnareb@gmail.com> (raw)
In-Reply-To: <200606291359.43640.jnareb@gmail.com>

./configure script checks now for existence of the following types
and structure members:
 * dirent.d_ino  in dirent.h (NO_D_INO_IN_DIRENT)
 * dirent.d_type in dirent.h (NO_D_TYPE_IN_DIRENT)
 * 'struct sockaddr_storage' in netinet/in.h (NO_SOCKADDR_STORAGE)

./configure script checks now for the following library functions:
 * strcasestr (NO_STRCASESTR)
 * strlcpy (NO_STRLCPY)
 * setenv (NO_SETENV)
in default C library and in libraries which have AC_CHECK_LIB done for
them (crypto, curl, expat).

NOTE: not all checks are implemented!

Signed-off-by: Jakub Narebski <jnareb@gmail•com>
---

This patch needs review by someone better versed in compiling git on
different platforms, namely AC_CHECK_MEMBER and AC_CHECK_TYPE needs
checking if all header files where git search for specified structure
member or specified type.

I don't know (yet) how to implement checking for NEEDS_SSL_WITH_CRYPTO
(probably also checlking for crypto library needs correction),
NEEDS_LIBICONV, NEEDS_SOCKET, NO_IPV6, NO_ICONV, Python < 2.3 and
Python == 2.3, if to check for NO_MMAP, and for NO_ACCURATE_DIFF.

This patch is to be considered preliminary!

 configure.ac |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 55d7a9b..fbd46e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,17 +14,41 @@ AC_CONFIG_SRCDIR([git.c])
 AC_DEFUN([MY_APPEND_LINE],
 [[echo "$1" >> config.mak.append]])# AC_APPEND_LINE
 
+
 # Checks for libraries.
-AC_MSG_NOTICE(CHECKS for libraries)
+AC_MSG_NOTICE([CHECKS for libraries])
 AC_CHECK_LIB([crypto], [SHA1_Init],,MY_APPEND_LINE(NO_OPENSSL=YesPlease))
 AC_CHECK_LIB([curl], [curl_easy_setopt],,MY_APPEND_LINE(NO_CURL=YesPlease))
 AC_CHECK_LIB([expat], [XML_ParserCreate],,MY_APPEND_LINE(NO_EXPAT=YesPlease))
 
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics])
+
+AC_CHECK_MEMBER(struct dirent.d_ino,,
+MY_APPEND_LINE(NO_D_INO_IN_DIRENT=YesPlease),
+[#include <dirent.h>])
+AC_CHECK_MEMBER(struct dirent.d_type,,
+MY_APPEND_LINE(NO_D_TYPE_IN_DIRENT=YesPlease),
+[#include <dirent.h>])
+
+AC_CHECK_TYPE(struct sockaddr_storage,,
+MY_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease),
+[#include <netinet/in.h>])
+
+
+# Checks for library functions.
+AC_MSG_NOTICE([CHECKS for library functions])
+AC_CHECK_FUNC(strcasestr,,MY_APPEND_LINE(NO_STRCASESTR=YesPlease))
+AC_CHECK_FUNC(strlcpy,,MY_APPEND_LINE(NO_STRLCPY=YesPlease))
+AC_CHECK_FUNC(setenv,,MY_APPEND_LINE(NO_SETENV=YesPlease))
+
+
 # Output files
 AC_CONFIG_FILES([config.mak:config.mak.in:config.mak.append], 
 [rm -f config.mak.append], 
-- 
1.4.0

  reply	other threads:[~2006-06-29 13:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29  1:01 [PATCH] autoconf: Use autoconf to write installation directories to config.mak Jakub Narebski
2006-06-29  7:18 ` Uwe Zeisberger
2006-06-29 11:59 ` [PATCH] autoconf: Use autoconf to check for libraries: openssl/crypto, curl, expat Jakub Narebski
2006-06-29 13:36   ` Jakub Narebski [this message]
2006-06-29 15:04     ` [PATCH] autoconf: Cleanup generation of config.mak.append by ./configure Jakub Narebski
2006-06-29 16:35       ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Jakub Narebski
2006-06-29 17:47         ` [PATCH] autoconf: Set mandir in config.mak.in and export variables not in Makefile Jakub Narebski
2006-06-30  0:11           ` [PATCH 7] autoconf: configure.ac uses variables to set in, out and temp files Jakub Narebski
2006-06-30  0:32             ` [PATCH 8] autoconf: ./configure script outputs to config.mac.auto Jakub Narebski
2006-06-30 12:37               ` [PATCH 9] autoconf: Cleanup generation of temporary "append" file Jakub Narebski
2006-06-30 12:39                 ` [PATCH 10] autoconf: Write how to use ./configure generated file in git build process Jakub Narebski
2006-06-30 12:41                   ` [PATCH 11] autoconf: Rename ./configure output file to config.mak.autogen Jakub Narebski
2006-06-30 15:08                     ` [PATCH 12] Revert "autoconf: Write how to use ./configure generated file in git build process" Jakub Narebski
2006-06-30 15:11                       ` [PATCH 13] autoconf: Append '-include config.mak.autogen' to config.mak if it is not present Jakub Narebski
2006-06-30 20:29                         ` Jakub Narebski
2006-06-30 21:45                         ` [RFC/PATCH 14] autoconf: Added --with/--without for openssl, curl, expat to ./configure Jakub Narebski
2006-06-30 21:57                           ` Pavel Roskin
2006-06-30 22:32                             ` Jakub Narebski
     [not found]                               ` <20060630233004.7xckw444g4g0gcs8@webmail.spamcop.net>
2006-07-01 17:55                                 ` Jakub Narebski
2006-07-08  7:33                                   ` Pavel Roskin
2006-06-30 22:34                           ` Jakub Narebski
2006-06-29 18:23         ` [PATCH] Allow INSTALL, bindir, mandir to be set in main Makefile Junio C Hamano
2006-06-29 20:16           ` Jakub Narebski
2006-06-29 12:46 ` [PATCH] autoconf: Use autoconf to write installation directories to config.mak Matthias Lederhofer
2006-06-29 13:48   ` Jakub Narebski
2006-06-30 12:18     ` Andreas Ericsson
2006-06-30 15:15       ` Jakub Narebski
2006-07-01 13:58       ` Jakub Narebski
2006-06-29 18:23   ` Junio C Hamano
     [not found]     ` <20060701213305.GA29115@pasky.or.cz>
2006-07-01 22:04       ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606291536.18667.jnareb@gmail.com \
    --to=jnareb@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox