vasprintf.m4 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # vasprintf.m4 serial 6
  2. dnl Copyright (C) 2002-2003, 2006-2007 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_VASPRINTF],
  7. [
  8. AC_CHECK_FUNCS([vasprintf])
  9. if test $ac_cv_func_vasprintf = no; then
  10. gl_REPLACE_VASPRINTF
  11. fi
  12. ])
  13. AC_DEFUN([gl_REPLACE_VASPRINTF],
  14. [
  15. AC_LIBOBJ([vasprintf])
  16. AC_LIBOBJ([asprintf])
  17. AC_REQUIRE([gl_STDIO_H_DEFAULTS])
  18. if test $ac_cv_func_vasprintf = yes; then
  19. REPLACE_VASPRINTF=1
  20. else
  21. HAVE_VASPRINTF=0
  22. fi
  23. gl_PREREQ_VASPRINTF_H
  24. gl_PREREQ_VASPRINTF
  25. gl_PREREQ_ASPRINTF
  26. ])
  27. # Prerequisites of the vasprintf portion of lib/stdio.h.
  28. AC_DEFUN([gl_PREREQ_VASPRINTF_H],
  29. [
  30. dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf().
  31. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
  32. ])
  33. # Prerequisites of lib/vasprintf.c.
  34. AC_DEFUN([gl_PREREQ_VASPRINTF],
  35. [
  36. ])
  37. # Prerequisites of lib/asprintf.c.
  38. AC_DEFUN([gl_PREREQ_ASPRINTF],
  39. [
  40. ])