Index: lib/autoconf/functions.m4 =================================================================== RCS file: /cvs/autoconf/lib/autoconf/functions.m4,v retrieving revision 1.55 diff -u -r1.55 functions.m4 --- lib/autoconf/functions.m4 21 Jan 2002 13:50:39 -0000 1.55 +++ lib/autoconf/functions.m4 12 Feb 2002 03:51:25 -0000 @@ -678,8 +678,8 @@ ])# AC_FUNC_MALLOC -# AC_FUNC_MEMCMP -# -------------- +# AC_FUNC_MEMCMP([ACTION-IF-YES], [ACTION-IF-NO]) +# ----------------------------------------------- AC_DEFUN([AC_FUNC_MEMCMP], [AC_CACHE_CHECK([for working memcmp], ac_cv_func_memcmp_working, [AC_RUN_IFELSE([AC_LANG_PROGRAM([], [[ @@ -710,7 +710,11 @@ [ac_cv_func_memcmp_working=yes], [ac_cv_func_memcmp_working=no], [ac_cv_func_memcmp_working=no])]) -test $ac_cv_func_memcmp_working = no && AC_LIBOBJ([memcmp]) +if test $ac_cv_func_memcmp_working = yes; then +m4_ifval([$1], [$1], [:]) +else +m4_ifval([$2], [$2], [AC_LIBOBJ([memcmp])]) +fi ])# AC_FUNC_MEMCMP Index: doc/autoconf.texi =================================================================== RCS file: /cvs/autoconf/doc/autoconf.texi,v retrieving revision 1.585 diff -u -r1.585 autoconf.texi --- doc/autoconf.texi 7 Feb 2002 15:49:32 -0000 1.585 +++ doc/autoconf.texi 12 Feb 2002 03:51:33 -0000 @@ -3677,7 +3677,7 @@ pointer), define @code{HAVE_MALLOC}. @end defmac address@hidden AC_FUNC_MEMCMP address@hidden AC_FUNC_MEMCMP (@ovar{action-if-yes}, @ovar{action-if-no}) @acindex FUNC_MEMCMP @ovindex LIBOBJS @c @fuindex memcmp @@ -3685,8 +3685,11 @@ If the @code{memcmp} function is not available, or does not work on 8-bit data (like the one on SunOS 4.1.3), or fails when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte -boundary (such as the one on NeXT x86 OpenStep), require an address@hidden replacement for @samp{memcmp}. +boundary (such as the one on NeXT x86 OpenStep), execute address@hidden If @var{action-if-no} is omitted or empty, the +default action is to require an @code{AC_LIBOBJ} replacement for address@hidden If the @code{memcmp} function works correctly, execute address@hidden The default action for this is to do nothing. @end defmac @defmac AC_FUNC_MKTIME