strdup.m4 943 B

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