2 dnl Copyright (C) 2002-2003, 2007-2011 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.
7 AC_DEFUN([gl_FUNC_RPMATCH],
9 dnl Persuade glibc <stdlib.h> to declare rpmatch().
10 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
12 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
13 AC_REPLACE_FUNCS([rpmatch])
14 if test $ac_cv_func_rpmatch = no; then
20 # Prerequisites of lib/rpmatch.c.
21 AC_DEFUN([gl_PREREQ_RPMATCH], [
22 AC_CACHE_CHECK([for nl_langinfo and YESEXPR], [gl_cv_langinfo_yesexpr],
23 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
24 [[char* cs = nl_langinfo(YESEXPR); return !cs;]])],
25 [gl_cv_langinfo_yesexpr=yes],
26 [gl_cv_langinfo_yesexpr=no])
28 if test $gl_cv_langinfo_yesexpr = yes; then
29 AC_DEFINE([HAVE_LANGINFO_YESEXPR], [1],
30 [Define if you have <langinfo.h> and nl_langinfo(YESEXPR).])