git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH 6] autoconf: Checks for some library functions.

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 8, 2006, 21:07 UTC
Message-ID
<11523928373026-git-send-email-jnareb@gmail.com>
In-Reply-To
<1152392837823-git-send-email-jnareb@gmail.com>
./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.
Checks not implemented:
 * NO_MMAP  - probably only via optional features configuration
 * NO_IPV6  - what does "lack IPv6 support" mean?
 * NO_ICONV - what does "properly support iconv" mean?
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Added only those checks I was sure how to do in autoconf.

Probably other, marked as not implemented checks either need custom test, or are more suited to site configuration section.

 configure.ac |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index cb81258..ab6a77a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,12 +69,21 @@ GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE
 
 
 ## 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.
 #
 # Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
-- 
1.4.0
Previous: Jakub NarebskiNext: Jakub Narebski
Message 26 of 34 in “autoconf: Use autoconf to write installation directories to config.mak.autogen”
  1. autoconf: Use autoconf to write installation directories to config.mak.autogenJakub Narebski, Jul 2, 2006
  2. autoconf: Use ./configure script in git *.spec fileJakub Narebski, Jul 3, 2006
  3. Junio C HamanoJul 3, 2006
  4. Jakub NarebskiJul 3, 2006
  5. Junio C HamanoJul 3, 2006
  6. contrib/ statusJunio C Hamano, Jul 3, 2006
  7. Eric WongJul 3, 2006
  8. Junio C HamanoJul 3, 2006
  9. Eric WongJul 4, 2006
  10. git-svn: migrate out of contribEric Wong, Jul 6, 2006
  11. Junio C HamanoJul 7, 2006
  12. git-svn: migrate out of contribEric Wong, Jul 7, 2006
  13. Jakub NarebskiJul 4, 2006
  14. Johannes SchindelinJul 4, 2006
  15. Jakub NarebskiJul 3, 2006
  16. Junio C HamanoJul 3, 2006
  17. Jakub NarebskiJul 3, 2006
  18. Junio C HamanoJul 3, 2006
  19. autoconf: Use %configure in git.spec, autoconf dependency only in rpm targetJakub Narebski, Jul 4, 2006
  20. Pavel RoskinJul 6, 2006
  21. Jakub NarebskiJul 7, 2006
  22. Teach make clean about configure and autoconfJakub Narebski, Jul 8, 2006
  23. Copy description of build configuration variables to configure.acJakub Narebski, Jul 8, 2006
  24. autoconf: Preparing the way for autodetectionJakub Narebski, Jul 8, 2006
  25. autoconf: Checks for typedefs, structures, and compiler characteristics.Jakub Narebski, Jul 8, 2006
  26. autoconf: Checks for some library functions.Jakub Narebski, Jul 8, 2006
  27. autoconf: Checks for librariesJakub Narebski, Jul 8, 2006
  28. autoconf: Checks for some programsJakub Narebski, Jul 8, 2006
  29. configure.ac vertical whitespace usage cleanupJakub Narebski, Jul 8, 2006
  30. Comment on this series of patches (PATCH 2-9)Jakub Narebski, Jul 8, 2006
  31. Junio C HamanoJul 8, 2006
  32. Junio C HamanoJul 9, 2006
  33. Jakub NarebskiJul 9, 2006
  34. Junio C HamanoJul 9, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.