summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fe4aafb)
raw | patch | inline | side by side (parent: fe4aafb)
author | Jakub Narebski <jnareb@gmail.com> | |
Fri, 7 Dec 2007 01:27:20 +0000 (02:27 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 7 Dec 2007 07:23:42 +0000 (23:23 -0800) |
Update configure.ac (and config.mak.in) to keep up with git
development by adding [compile] test whether your library has an old
iconv(), where the second (input buffer pointer) parameter is declared
with type (const char **) (OLD_ICONV).
Test-proposed-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
development by adding [compile] test whether your library has an old
iconv(), where the second (input buffer pointer) parameter is declared
with type (const char **) (OLD_ICONV).
Test-proposed-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.mak.in | patch | blob | history | |
configure.ac | patch | blob | history |
diff --git a/config.mak.in b/config.mak.in
index 11d256e9cf5b51154a3bf0084f9e3bcea5702352..7d5df9bf3c5dc898a68b538bae55f3d44dbc01ff 100644 (file)
--- a/config.mak.in
+++ b/config.mak.in
NO_SETENV=@NO_SETENV@
NO_MKDTEMP=@NO_MKDTEMP@
NO_ICONV=@NO_ICONV@
+OLD_ICONV=@OLD_ICONV@
NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@
diff --git a/configure.ac b/configure.ac
index 5f8a15b9f9580bea6f350e8af468f81cf2535c9e..dd4b4eb9822f131f0efc746013a803c4adba02d2 100644 (file)
--- a/configure.ac
+++ b/configure.ac
## Checks for header files.
+AC_MSG_NOTICE([CHECKS for header files])
+#
+# Define OLD_ICONV if your library has an old iconv(), where the second
+# (input buffer pointer) parameter is declared with type (const char **).
+AC_DEFUN([OLDICONVTEST_SRC], [[
+#include <iconv.h>
+
+extern size_t iconv(iconv_t cd,
+ char **inbuf, size_t *inbytesleft,
+ char **outbuf, size_t *outbytesleft);
+
+int main(void)
+{
+ return 0;
+}
+]])
+AC_MSG_CHECKING([for old iconv()])
+AC_COMPILE_IFELSE(OLDICONVTEST_SRC,
+ [AC_MSG_RESULT([no])],
+ [AC_MSG_RESULT([yes])
+ OLD_ICONV=UnfortunatelyYes])
+AC_SUBST(OLD_ICONV)
## Checks for typedefs, structures, and compiler characteristics.