vasprintf.m4 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # vasprintf.m4 serial 6
  2. dnl Copyright (C) 2002-2003, 2006-2007, 2009-2017 Free Software Foundation,
  3. dnl Inc.
  4. dnl This file is free software; the Free Software Foundation
  5. dnl gives unlimited permission to copy and/or distribute it,
  6. dnl with or without modifications, as long as this notice is preserved.
  7. AC_DEFUN([gl_FUNC_VASPRINTF],
  8. [
  9. AC_CHECK_FUNCS([vasprintf])
  10. if test $ac_cv_func_vasprintf = no; then
  11. gl_REPLACE_VASPRINTF
  12. fi
  13. ])
  14. AC_DEFUN([gl_REPLACE_VASPRINTF],
  15. [
  16. AC_LIBOBJ([vasprintf])
  17. AC_LIBOBJ([asprintf])
  18. AC_REQUIRE([gl_STDIO_H_DEFAULTS])
  19. if test $ac_cv_func_vasprintf = yes; then
  20. REPLACE_VASPRINTF=1
  21. else
  22. HAVE_VASPRINTF=0
  23. fi
  24. gl_PREREQ_VASPRINTF_H
  25. gl_PREREQ_VASPRINTF
  26. gl_PREREQ_ASPRINTF
  27. ])
  28. # Prerequisites of the vasprintf portion of lib/stdio.h.
  29. AC_DEFUN([gl_PREREQ_VASPRINTF_H],
  30. [
  31. dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf().
  32. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
  33. ])
  34. # Prerequisites of lib/vasprintf.c.
  35. AC_DEFUN([gl_PREREQ_VASPRINTF],
  36. [
  37. ])
  38. # Prerequisites of lib/asprintf.c.
  39. AC_DEFUN([gl_PREREQ_ASPRINTF],
  40. [
  41. ])