summaryrefslogtreecommitdiff
path: root/m4/strcasestr.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/strcasestr.m4')
-rw-r--r--m4/strcasestr.m411
1 files changed, 8 insertions, 3 deletions
diff --git a/m4/strcasestr.m4 b/m4/strcasestr.m4
index e1e5390542..d641958ee0 100644
--- a/m4/strcasestr.m4
+++ b/m4/strcasestr.m4
@@ -1,20 +1,25 @@
-# strcasestr.m4 serial 12
-dnl Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+# strcasestr.m4 serial 13
+dnl Copyright (C) 2005, 2007, 2008, 2009 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.
-dnl Check that strcasestr is present.
+dnl Check that strcasestr is present and works.
AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE],
[
dnl Persuade glibc <string.h> to declare strcasestr().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_MEMCHR])
AC_REPLACE_FUNCS([strcasestr])
if test $ac_cv_func_strcasestr = no; then
HAVE_STRCASESTR=0
gl_PREREQ_STRCASESTR
+ elif test "$gl_cv_func_memchr_works" != yes; then
+ REPLACE_STRCASESTR=1
+ AC_LIBOBJ([strcasestr])
+ gl_PREREQ_STRCASESTR
fi
]) # gl_FUNC_STRCASESTR_SIMPLE