summaryrefslogtreecommitdiff
path: root/m4/wcsstr.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-02-06 15:18:24 +0100
committerBruno Haible <bruno@clisp.org>2011-02-07 23:36:07 +0100
commit8e5e25f79c3ff689fc3a3aab0fe439064ef76d02 (patch)
tree9a5ed7a76917027d013c147a0878a7b58aaedd77 /m4/wcsstr.m4
parentcaf727a459d4f451f29c2edf565d7d4eb12df6fc (diff)
downloadgnulib-8e5e25f79c3ff689fc3a3aab0fe439064ef76d02.tar.gz
New module 'wcsstr'.
* modules/wcsstr: New file. * lib/wchar.in.h (wcsstr): New declaration. * lib/wcsstr.c: New file. * lib/wcsstr-impl.h: New file, from libutf8 with modifications. * m4/wcsstr.m4: New file. * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsstr is declared. (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSTR, HAVE_WCSSTR. * modules/wchar (Makefile.am): Substitute GNULIB_WCSSTR, HAVE_WCSSTR. * tests/test-wchar-c++.cc: Test the declaration of wcsstr. * doc/posix-functions/wcsstr.texi: Mention the new module.
Diffstat (limited to 'm4/wcsstr.m4')
-rw-r--r--m4/wcsstr.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/wcsstr.m4 b/m4/wcsstr.m4
new file mode 100644
index 0000000000..3ac2caf448
--- /dev/null
+++ b/m4/wcsstr.m4
@@ -0,0 +1,15 @@
+# wcsstr.m4 serial 1
+dnl Copyright (C) 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCSSTR],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([wcsstr])
+ if test $ac_cv_func_wcsstr = no; then
+ HAVE_WCSSTR=0
+ AC_LIBOBJ([wcsstr])
+ fi
+])