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