3 AC_DEFUN([AC_GNU_SOURCE],
4 [AH_VERBATIM([_GNU_SOURCE],
5 [/* Enable GNU extensions on systems that have them. */
9 AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
10 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
11 AC_DEFINE([_GNU_SOURCE])
16 AC_DEFUN([AC_PROG_EGREP],
17 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
18 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
19 then ac_cv_prog_egrep='grep -E'
20 else ac_cv_prog_egrep='egrep'
22 EGREP=$ac_cv_prog_egrep
29 AC_DEFUN([AC_TYPE_MBSTATE_T],
30 [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
35 [mbstate_t x; return sizeof x;])],
36 [ac_cv_type_mbstate_t=yes],
37 [ac_cv_type_mbstate_t=no])])
38 if test $ac_cv_type_mbstate_t = yes; then
39 AC_DEFINE([HAVE_MBSTATE_T], 1,
40 [Define to 1 if <wchar.h> declares mbstate_t.])
42 AC_DEFINE([mbstate_t], int,
43 [Define to a type if <wchar.h> does not define.])