strdup.m4 813 B

123456789101112131415161718192021222324252627282930313233
  1. # strdup.m4 serial 15
  2. dnl Copyright (C) 2002-2023 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_STRDUP],
  7. [
  8. AC_REQUIRE([gl_STRING_H_DEFAULTS])
  9. AC_CHECK_DECLS_ONCE([strdup])
  10. if test $ac_cv_have_decl_strdup = no; then
  11. HAVE_DECL_STRDUP=0
  12. fi
  13. ])
  14. AC_DEFUN([gl_FUNC_STRDUP_POSIX],
  15. [
  16. AC_REQUIRE([gl_STRING_H_DEFAULTS])
  17. AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
  18. if test $gl_cv_func_malloc_posix != yes; then
  19. REPLACE_STRDUP=1
  20. fi
  21. AC_CHECK_DECLS_ONCE([strdup])
  22. if test $ac_cv_have_decl_strdup = no; then
  23. HAVE_DECL_STRDUP=0
  24. fi
  25. ])
  26. # Prerequisites of lib/strdup.c.
  27. AC_DEFUN([gl_PREREQ_STRDUP], [:])