/xbmc/screensavers/rsxs-0.9/m4/strnlen.m4

http://github.com/xbmc/xbmc · m4 · 29 lines · 19 code · 4 blank · 6 comment · 0 complexity · dbf42c39f432ce33fe79e8e02b353f49 MD5 · raw file

  1. # strnlen.m4 serial 5
  2. dnl Copyright (C) 2002-2003, 2005 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_STRNLEN],
  7. [
  8. AC_LIBSOURCES([strnlen.c, strnlen.h])
  9. dnl Persuade glibc <string.h> to declare strnlen().
  10. AC_REQUIRE([AC_GNU_SOURCE])
  11. AC_FUNC_STRNLEN
  12. if test $ac_cv_func_strnlen_working = no; then
  13. # This is necessary because automake-1.6.1 doens't understand
  14. # that the above use of AC_FUNC_STRNLEN means we may have to use
  15. # lib/strnlen.c.
  16. #AC_LIBOBJ(strnlen)
  17. AC_DEFINE(strnlen, rpl_strnlen,
  18. [Define to rpl_strnlen if the replacement function should be used.])
  19. gl_PREREQ_STRNLEN
  20. fi
  21. ])
  22. # Prerequisites of lib/strnlen.c.
  23. AC_DEFUN([gl_PREREQ_STRNLEN], [
  24. AC_CHECK_DECLS_ONCE(strnlen)
  25. ])