summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2005-09-26 13:58:51 +0000
committerBruno Haible <bruno@clisp.org>2005-09-26 13:58:51 +0000
commitbe4b03ff802ce76ee841d09d7546039d5e991127 (patch)
treeb855fd546c6cad1e001d2e97ccfe7f3645f8f998 /m4
parentfbf26a89d86387bcf6f801dcd4455e2751c3867e (diff)
downloadgnulib-be4b03ff802ce76ee841d09d7546039d5e991127.tar.gz
Deal with the fact that mbchar.h, mbfile.h, mbiter.h, mbuiter.h can
only be #included conditionally.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog10
-rw-r--r--m4/mbchar.m410
-rw-r--r--m4/mbfile.m45
-rw-r--r--m4/mbiter.m45
-rw-r--r--m4/strcase.m45
-rw-r--r--m4/strcasestr.m45
-rw-r--r--m4/strstr.m45
7 files changed, 35 insertions, 10 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 369fe3024c..0ff53684bf 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,13 @@
+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,
diff --git a/m4/mbchar.m4 b/m4/mbchar.m4
index dd613cbc69..df351a6eb2 100644
--- a/m4/mbchar.m4
+++ b/m4/mbchar.m4
@@ -1,4 +1,4 @@
-# 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,
@@ -10,5 +10,11 @@ dnl From Bruno Haible.
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
])
diff --git a/m4/mbfile.m4 b/m4/mbfile.m4
index 5ea492dd1b..032bc996e1 100644
--- a/m4/mbfile.m4
+++ b/m4/mbfile.m4
@@ -1,4 +1,4 @@
-# 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,
@@ -10,5 +10,8 @@ dnl From Bruno Haible.
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])
:
])
diff --git a/m4/mbiter.m4 b/m4/mbiter.m4
index 3eb92bcca7..7d51af10dc 100644
--- a/m4/mbiter.m4
+++ b/m4/mbiter.m4
@@ -1,4 +1,4 @@
-# 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,
@@ -10,5 +10,8 @@ dnl From Bruno Haible.
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])
:
])
diff --git a/m4/strcase.m4 b/m4/strcase.m4
index 8a8ff3a451..6db401bb1b 100644
--- a/m4/strcase.m4
+++ b/m4/strcase.m4
@@ -1,4 +1,4 @@
-# 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,
@@ -29,7 +29,8 @@ AC_DEFUN([gl_FUNC_STRNCASECMP],
# Prerequisites of lib/strcasecmp.c.
AC_DEFUN([gl_PREREQ_STRCASECMP], [
- gl_FUNC_MBRTOWC
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ :
])
# Prerequisites of lib/strncasecmp.c.
diff --git a/m4/strcasestr.m4 b/m4/strcasestr.m4
index 30edffd457..ae83c481d7 100644
--- a/m4/strcasestr.m4
+++ b/m4/strcasestr.m4
@@ -1,4 +1,4 @@
-# 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,
@@ -15,5 +15,6 @@ AC_DEFUN([gl_FUNC_STRCASESTR],
# Prerequisites of lib/strcasestr.c.
AC_DEFUN([gl_PREREQ_STRCASESTR], [
- gl_FUNC_MBRTOWC
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ :
])
diff --git a/m4/strstr.m4 b/m4/strstr.m4
index aea809ebd1..a785d42866 100644
--- a/m4/strstr.m4
+++ b/m4/strstr.m4
@@ -1,4 +1,4 @@
-# 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,
@@ -14,5 +14,6 @@ AC_DEFUN([gl_FUNC_STRSTR],
# Prerequisites of lib/strstr.c.
AC_DEFUN([gl_PREREQ_STRSTR], [
- gl_FUNC_MBRTOWC
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ :
])