canonicalize-lgpl.m4 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # canonicalize-lgpl.m4 serial 5
  2. dnl Copyright (C) 2003, 2006-2007, 2009 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_CANONICALIZE_LGPL],
  7. [
  8. dnl Do this replacement check manually because the file name is shorter
  9. dnl than the function name.
  10. AC_CHECK_DECLS_ONCE([canonicalize_file_name])
  11. AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
  12. if test $ac_cv_func_canonicalize_file_name = no; then
  13. AC_LIBOBJ([canonicalize-lgpl])
  14. AC_DEFINE([realpath], [rpl_realpath],
  15. [Define to a replacement function name for realpath().])
  16. gl_PREREQ_CANONICALIZE_LGPL
  17. fi
  18. ])
  19. # Like gl_CANONICALIZE_LGPL, except prepare for separate compilation
  20. # (no AC_LIBOBJ).
  21. AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
  22. [
  23. AC_CHECK_DECLS_ONCE([canonicalize_file_name])
  24. AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
  25. gl_PREREQ_CANONICALIZE_LGPL
  26. ])
  27. # Prerequisites of lib/canonicalize-lgpl.c.
  28. AC_DEFUN([gl_PREREQ_CANONICALIZE_LGPL],
  29. [
  30. AC_CHECK_HEADERS_ONCE([sys/param.h unistd.h])
  31. AC_CHECK_FUNCS_ONCE([getcwd readlink])
  32. ])