vsnprintf.m4 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # vsnprintf.m4 serial 5
  2. dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. AC_DEFUN([gl_FUNC_VSNPRINTF],
  7. [
  8. AC_REQUIRE([gl_STDIO_H_DEFAULTS])
  9. gl_cv_func_vsnprintf_usable=no
  10. AC_CHECK_FUNCS([vsnprintf])
  11. if test $ac_cv_func_vsnprintf = yes; then
  12. gl_SNPRINTF_SIZE1
  13. case "$gl_cv_func_snprintf_size1" in
  14. *yes)
  15. gl_cv_func_vsnprintf_usable=yes
  16. ;;
  17. esac
  18. fi
  19. if test $gl_cv_func_vsnprintf_usable = no; then
  20. gl_REPLACE_VSNPRINTF
  21. fi
  22. AC_CHECK_DECLS_ONCE([vsnprintf])
  23. if test $ac_cv_have_decl_vsnprintf = no; then
  24. HAVE_DECL_VSNPRINTF=0
  25. fi
  26. ])
  27. AC_DEFUN([gl_REPLACE_VSNPRINTF],
  28. [
  29. AC_REQUIRE([gl_STDIO_H_DEFAULTS])
  30. AC_LIBOBJ([vsnprintf])
  31. if test $ac_cv_func_vsnprintf = yes; then
  32. REPLACE_VSNPRINTF=1
  33. fi
  34. gl_PREREQ_VSNPRINTF
  35. ])
  36. # Prerequisites of lib/vsnprintf.c.
  37. AC_DEFUN([gl_PREREQ_VSNPRINTF], [:])