Debian Codegraph @

m4/strdup.m4

raw
1 # strdup.m4
2 # serial 16
3
4 dnl Copyright (C) 2002-2024 Free Software Foundation, Inc.
5
6 dnl This file is free software; the Free Software Foundation
7 dnl gives unlimited permission to copy and/or distribute it,
8 dnl with or without modifications, as long as this notice is preserved.
9 dnl This file is offered as-is, without any warranty.
10
11 AC_DEFUN([gl_FUNC_STRDUP],
12 [
13 AC_REQUIRE([gl_STRING_H_DEFAULTS])
14 AC_CHECK_DECLS_ONCE([strdup])
15 if test $ac_cv_have_decl_strdup = no; then
16 HAVE_DECL_STRDUP=0
17 fi
18 ])
19
20 AC_DEFUN([gl_FUNC_STRDUP_POSIX],
21 [
22 AC_REQUIRE([gl_STRING_H_DEFAULTS])
23 AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
24 case "$gl_cv_func_malloc_posix" in
25 *yes) ;;
26 *) REPLACE_STRDUP=1 ;;
27 esac
28 AC_CHECK_DECLS_ONCE([strdup])
29 if test $ac_cv_have_decl_strdup = no; then
30 HAVE_DECL_STRDUP=0
31 fi
32 ])
33
34 # Prerequisites of lib/strdup.c.
35 AC_DEFUN([gl_PREREQ_STRDUP], [:])