mbrlen: Move AC_LIBOBJ invocations to module description.
[pspp] / m4 / wmemchr.m4
index 9a52b34f2dc74443cdfd09c8b9f155e11d5bd78d..b2a2052918a7c22a378bb20078027ea3d0c80380 100644 (file)
@@ -6,5 +6,10 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_WMEMCHR],
 [
-  AC_REPLACE_FUNCS([wmemchr])
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([wmemchr])
+  if test $ac_cv_func_wmemchr = no; then
+    HAVE_WMEMCHR=0
+    AC_LIBOBJ([wmemchr])
+  fi
 ])