Tizen 2.0 Release
[external/tizen-coreutils.git] / m4 / vasprintf.m4
1 # vasprintf.m4 serial 3
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
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
15 AC_DEFUN([gl_REPLACE_VASPRINTF],
16 [
17   AC_LIBOBJ([vasprintf])
18   AC_LIBOBJ([asprintf])
19   if test $ac_cv_func_vasprintf = yes; then
20     AC_DEFINE([REPLACE_VASPRINTF], 1,
21       [Define if vasprintf exists but is overridden by gnulib.])
22   fi
23   gl_PREREQ_VASPRINTF_H
24   gl_PREREQ_VASPRINTF
25   gl_PREREQ_ASPRINTF
26 ])
27
28 # Prerequisites of lib/vasprintf.h.
29 AC_DEFUN([gl_PREREQ_VASPRINTF_H],
30 [
31   dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf().
32   AC_REQUIRE([AC_GNU_SOURCE])
33 ])
34
35 # Prerequisites of lib/vasprintf.c.
36 AC_DEFUN([gl_PREREQ_VASPRINTF],
37 [
38 ])
39
40 # Prerequisites of lib/asprintf.c.
41 AC_DEFUN([gl_PREREQ_ASPRINTF],
42 [
43 ])