summaryrefslogtreecommitdiff
path: root/m4/snprintf.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-02-14 17:06:13 +0100
committerLudovic Courtès <ludo@gnu.org>2010-02-14 17:06:13 +0100
commit61cd9dc907b8a09990b14e9aeac7e20fe77cecc6 (patch)
tree8a843e84fae6ad63b58366dc30a5d4aeb96ae0cb /m4/snprintf.m4
parent60b6a84f0f2d8d43491835a518463f4a8273bf87 (diff)
downloadguile-61cd9dc907b8a09990b14e9aeac7e20fe77cecc6.tar.gz
Use Gnulib's `getaddrinfo' module.
* m4/gnulib-cache.m4: Add `getaddrinfo'. * libguile/Makefile.am (libguile_la_LDFLAGS): Add `$(GETADDRINFO_LIB) $(HOSTENT_LIB) $(SERVENT_LIB)'.
Diffstat (limited to 'm4/snprintf.m4')
-rw-r--r--m4/snprintf.m440
1 files changed, 40 insertions, 0 deletions
diff --git a/m4/snprintf.m4 b/m4/snprintf.m4
new file mode 100644
index 000000000..522b107b1
--- /dev/null
+++ b/m4/snprintf.m4
@@ -0,0 +1,40 @@
+# snprintf.m4 serial 5
+dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SNPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ gl_cv_func_snprintf_usable=no
+ AC_CHECK_FUNCS([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ gl_SNPRINTF_SIZE1
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_usable = no; then
+ gl_REPLACE_SNPRINTF
+ fi
+ AC_CHECK_DECLS_ONCE([snprintf])
+ if test $ac_cv_have_decl_snprintf = no; then
+ HAVE_DECL_SNPRINTF=0
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_SNPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ gl_PREREQ_SNPRINTF
+])
+
+# Prerequisites of lib/snprintf.c.
+AC_DEFUN([gl_PREREQ_SNPRINTF], [:])