8d511b06187167f4ce3eaa1dd713edb9617dd048
[gnulib.git] / m4 / memrchr.m4
1 # memrchr.m4 serial 6
2 dnl Copyright (C) 2002, 2003, 2005, 2006, 2007 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
7 AC_DEFUN([gl_FUNC_MEMRCHR],
8 [
9   dnl Persuade glibc <string.h> to declare memrchr().
10   AC_REQUIRE([AC_GNU_SOURCE])
11
12   AC_CHECK_DECLS_ONCE([memrchr])
13   if test $ac_cv_have_decl_memrchr = no; then
14     HAVE_DECL_MEMRCHR=0
15   fi
16
17   AC_REPLACE_FUNCS(memrchr)
18   if test $ac_cv_func_memrchr = no; then
19     gl_PREREQ_MEMRCHR
20   fi
21 ])
22
23 # Prerequisites of lib/memrchr.c.
24 AC_DEFUN([gl_PREREQ_MEMRCHR], [:])