1# libgrep.m4 serial 2 (gettext-0.16)
2dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([gt_LIBGREP],
8[
9  AC_REQUIRE([AM_STDBOOL_H])
10  AC_REQUIRE([gl_FUNC_MBRTOWC])
11  AC_CHECK_FUNC([wcscoll], ,
12    [AC_DEFINE([wcscoll], [wcscmp],
13       [Define to wcscmp if the function wcscoll does not exist.])])
14  m4_pushdef([AC_LIBOBJ], m4_defn([gt_LIBGREP_OBJ]))
15  m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gt_LIBGREP_REPLACE_FUNCS]))
16  gl_HARD_LOCALE
17  gl_FUNC_MEMCHR
18  gl_FUNC_STRDUP
19  gl_INCLUDED_REGEX([libgrep/regex.c])
20  m4_popdef([AC_REPLACE_FUNCS])
21  m4_popdef([AC_LIBOBJ])
22  AC_SUBST([LIBGREPOBJS])
23])
24
25# Like AC_LIBOBJ, except that the module name goes into LIBGREPOBJS
26# instead of into LIBOBJS.
27AC_DEFUN([gt_LIBGREP_OBJ],
28  [LIBGREPOBJS="$LIBGREPOBJS $1.$ac_objext"])
29
30# Like AC_REPLACE_FUNCS, except that the module name goes into LIBGREPOBJS
31# instead of into LIBOBJS.
32AC_DEFUN([gt_LIBGREP_REPLACE_FUNCS],
33  [AC_CHECK_FUNCS([$1], , [gt_LIBGREP_OBJ($ac_func)])])
34