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

[PATCH] autoconf: Add tests for memmem, strtoumax and mkdtemp functions

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 19, 2007, 18:47 UTC
Message-ID
<200711191947.05960.jnareb@gmail.com>

Update configure.ac (and config.mak.in) to keep up with git development by adding tests for memmem (NO_MEMMEM), strtoumax (NO_STRTOUMAX) and mkdtemp (NO_MKDTEMP) functions.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This is beginning of "bring configure up to date" thingy.

By the way, do you have idea how to test for the following in configure.ac:

* Define NO_PREAD if you have a problem with pread() system call (e.g.
  cygwin.dll before v1.5.22).
  - what is the problem? how to detect it?
* Define NO_FAST_WORKING_DIRECTORY if accessing objects in pack files is
  generally faster on your platform than accessing the working directory.
  - if at all possible
* Define NO_TRUSTABLE_FILEMODE if your filesystem may claim to support
  the executable mode bit, but doesn't really do so.
  - I think there were some code here
* Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib"
  that tells runtime paths to dynamic libraries;
  "-Wl,-rpath=/path/lib" is used instead.
* Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
  MakeMaker (e.g. using ActiveState under Cygwin).
* Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8
* Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72.
  - it needs some portable way to check asciidoc and docbook-xsl version
* Define OLD_ICONV if your library has an old iconv(), where the second
  (input buffer pointer) parameter is declared with type (const char **).
  - perhaps compile with new iconv and check for compile errors?
 config.mak.in |    3 +++
 configure.ac  |   18 ++++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/config.mak.in b/config.mak.in
index 776b805..11d256e 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -35,7 +35,10 @@ NO_SOCKADDR_STORAGE=@NO_SOCKADDR_STORAGE@
 NO_IPV6=@NO_IPV6@
 NO_C99_FORMAT=@NO_C99_FORMAT@
 NO_STRCASESTR=@NO_STRCASESTR@
+NO_MEMMEM=@NO_MEMMEM@
 NO_STRLCPY=@NO_STRLCPY@
+NO_STRTOUMAX=@NO_STRTOUMAX@
 NO_SETENV=@NO_SETENV@
+NO_MKDTEMP=@NO_MKDTEMP@
 NO_ICONV=@NO_ICONV@
 NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@
diff --git a/configure.ac b/configure.ac
index 53e9a17..7bcf1a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -289,18 +289,36 @@ AC_CHECK_FUNC(strcasestr,
 [NO_STRCASESTR=YesPlease])
 AC_SUBST(NO_STRCASESTR)
 #
+# Define NO_MEMMEM if you don't have memmem.
+AC_CHECK_FUNC(memmem,
+[NO_MEMMEM=],
+[NO_MEMMEM=YesPlease])
+AC_SUBST(NO_MEMMEM)
+#
 # Define NO_STRLCPY if you don't have strlcpy.
 AC_CHECK_FUNC(strlcpy,
 [NO_STRLCPY=],
 [NO_STRLCPY=YesPlease])
 AC_SUBST(NO_STRLCPY)
 #
+# Define NO_STRTOUMAX if you don't have strtoumax in the C library.
+AC_CHECK_FUNC(strtoumax,
+[NO_STRTOUMAX=],
+[NO_STRTOUMAX=YesPlease])
+AC_SUBST(NO_STRTOUMAX)
+#
 # Define NO_SETENV if you don't have setenv in the C library.
 AC_CHECK_FUNC(setenv,
 [NO_SETENV=],
 [NO_SETENV=YesPlease])
 AC_SUBST(NO_SETENV)
 #
+# Define NO_MKDTEMP if you don't have mkdtemp in the C library.
+AC_CHECK_FUNC(mkdtemp,
+[NO_MKDTEMP=],
+[NO_MKDTEMP=YesPlease])
+AC_SUBST(NO_MKDTEMP)
+#
 # Define NO_MMAP if you want to avoid mmap.
 #
 # Define NO_ICONV if your libc does not properly support iconv.
-- 
1.5.3.5
Next: Shawn O. Pearce
Message 1 of 20 in “autoconf: Add tests for memmem, strtoumax and mkdtemp functions”
  1. autoconf: Add tests for memmem, strtoumax and mkdtemp functionsJakub Narebski, Nov 19, 2007
  2. Shawn O. PearceNov 21, 2007
  3. Jakub NarebskiNov 21, 2007
  4. Stefan-W. HahnNov 20, 2007
  5. Matt KraaiNov 21, 2007
  6. autoconf: Add test for OLD_ICONVJakub Narebski, Dec 5, 2007
  7. Brian GernhardtDec 5, 2007
  8. Jakub NarebskiDec 5, 2007
  9. Wincent ColaiutaDec 5, 2007
  10. Jakub NarebskiDec 5, 2007
  11. Wincent ColaiutaDec 5, 2007
  12. Jakub NarebskiDec 5, 2007
  13. Brian GernhardtDec 5, 2007
  14. Wincent ColaiutaDec 6, 2007
  15. Junio C HamanoDec 5, 2007
  16. Jakub NarebskiDec 5, 2007
  17. Junio C HamanoDec 5, 2007
  18. autoconf: Add test for OLD_ICONV (squelching compiler warning)Jakub Narebski, Dec 5, 2007
  19. Junio C HamanoDec 5, 2007
  20. Pascal ObryDec 5, 2007

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.