only be #included conditionally.
+2005-09-26 Bruno Haible <bruno@clisp.org>
+
+ * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
+ is necessary.
+ (lib_SOURCES): Remove mbchar.c.
+ * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
+ (Files): Add m4/mbrtowc.m4.
+ * modules/mbiter: Likewise.
+ * modules/mbuiter: Likewise.
+
2005-09-25 Jim Meyering <jim@meyering.net>
* modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
+2005-09-26 Bruno Haible <bruno@clisp.org>
+
+ * mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't compile
+ mbchar.c if they are not both present.
+ * mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
+ * mbiter.m4 (gl_MBITER): Likewise.
+ * strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
+ * strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
+ * strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
+
2005-09-23 Paul Eggert <eggert@cs.ucla.edu>
* regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
-# mbchar.m4 serial 1
+# mbchar.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_MBCHAR],
[
AC_REQUIRE([AC_GNU_SOURCE])
- :
+ dnl The following line is that so the user can test
+ dnl HAVE_WCHAR_H && HAVE_WCTYPE_H before #include "mbchar.h".
+ AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
+ dnl Compile mbchar.c only if HAVE_WCHAR_H && HAVE_WCTYPE_H.
+ if test $ac_cv_header_wchar_h = yes && test $ac_cv_header_wctype_h = yes; then
+ AC_LIBOBJ([mbchar])
+ fi
])
-# mbfile.m4 serial 1
+# mbfile.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_MBFILE],
[
AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ dnl The following line is that so the user can test HAVE_MBRTOWC before
+ dnl #include "mbfile.h".
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
:
])
-# mbiter.m4 serial 1
+# mbiter.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_MBITER],
[
AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ dnl The following line is that so the user can test HAVE_MBRTOWC before
+ dnl #include "mbiter.h" or "mbuiter.h".
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
:
])
-# strcase.m4 serial 2
+# strcase.m4 serial 3
dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Prerequisites of lib/strcasecmp.c.
AC_DEFUN([gl_PREREQ_STRCASECMP], [
- gl_FUNC_MBRTOWC
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ :
])
# Prerequisites of lib/strncasecmp.c.
-# strcasestr.m4 serial 1
+# strcasestr.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Prerequisites of lib/strcasestr.c.
AC_DEFUN([gl_PREREQ_STRCASESTR], [
- gl_FUNC_MBRTOWC
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ :
])
-# strstr.m4 serial 4
+# strstr.m4 serial 5
dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Prerequisites of lib/strstr.c.
AC_DEFUN([gl_PREREQ_STRSTR], [
- gl_FUNC_MBRTOWC
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ :
])
gl_MBCHAR
Makefile.am:
-lib_SOURCES += mbchar.h mbchar.c
+lib_SOURCES += mbchar.h
Include:
-"mbchar.h"
+#if HAVE_WCHAR_H && HAVE_WCTYPE_H
+#include "mbchar.h"
+#endif
License:
LGPL
Files:
lib/mbfile.h
m4/mbfile.m4
+m4/mbrtowc.m4
Depends-on:
mbchar
lib_SOURCES += mbfile.h
Include:
-"mbfile.h"
+#if HAVE_MBRTOWC
+#include "mbfile.h"
+#endif
License:
LGPL
Files:
lib/mbiter.h
m4/mbiter.m4
+m4/mbrtowc.m4
Depends-on:
mbchar
lib_SOURCES += mbiter.h
Include:
-"mbiter.h"
+#if HAVE_MBRTOWC
+#include "mbiter.h"
+#endif
License:
LGPL
Files:
lib/mbuiter.h
m4/mbiter.m4
+m4/mbrtowc.m4
Depends-on:
mbchar
lib_SOURCES += mbuiter.h
Include:
-"mbuiter.h"
+#if HAVE_MBRTOWC
+#include "mbuiter.h"
+#endif
License:
LGPL