diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | m4/memmem.m4 | 11 | ||||
-rw-r--r-- | modules/memmem | 3 | ||||
-rw-r--r-- | modules/memmem-simple | 3 |
4 files changed, 23 insertions, 4 deletions
@@ -1,5 +1,15 @@ 2011-05-21 Bruno Haible <bruno@clisp.org> + memmem*: Move AC_LIBOBJ invocations to module description. + * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Call AC_CHECK_FUNCS instead of + AC_REPLACE_FUNCS. Set HAVE_MEMMEM. Move AC_LIBOBJ invocations from + here... + (gl_FUNC_MEMMEM): ... and here... + * modules/memmem-simple (configure.ac): ... to here. + * modules/memmem (configure.ac): ... and here. + +2011-05-21 Bruno Haible <bruno@clisp.org> + memcpy: Move AC_LIBOBJ invocations to module description. * m4/memcpy.m4 (gl_FUNC_MEMCPY): Call AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMCPY invocations from diff --git a/m4/memmem.m4 b/m4/memmem.m4 index dae71a968c..e912205cd0 100644 --- a/m4/memmem.m4 +++ b/m4/memmem.m4 @@ -1,4 +1,4 @@ -# memmem.m4 serial 22 +# memmem.m4 serial 23 dnl Copyright (C) 2002-2004, 2007-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, @@ -11,7 +11,12 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REPLACE_FUNCS([memmem]) + AC_CHECK_FUNCS([memmem]) + if test $ac_cv_func_memmem = yes; then + HAVE_MEMMEM=1 + else + HAVE_MEMMEM=0 + fi AC_CHECK_DECLS_ONCE([memmem]) if test $ac_cv_have_decl_memmem = no; then HAVE_DECL_MEMMEM=0 @@ -68,7 +73,6 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], ]) if test "$gl_cv_func_memmem_works_always" != yes; then REPLACE_MEMMEM=1 - AC_LIBOBJ([memmem]) fi fi gl_PREREQ_MEMMEM @@ -133,7 +137,6 @@ static void quit (int sig) { exit (sig + 128); } ]) if test "$gl_cv_func_memmem_works_fast" != yes; then REPLACE_MEMMEM=1 - AC_LIBOBJ([memmem]) fi fi ]) # gl_FUNC_MEMMEM diff --git a/modules/memmem b/modules/memmem index 8dea8932ae..63bd3efce1 100644 --- a/modules/memmem +++ b/modules/memmem @@ -8,6 +8,9 @@ memmem-simple configure.ac: gl_FUNC_MEMMEM +if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then + AC_LIBOBJ([memmem]) +fi Makefile.am: diff --git a/modules/memmem-simple b/modules/memmem-simple index c84755d647..d4ae332a26 100644 --- a/modules/memmem-simple +++ b/modules/memmem-simple @@ -15,6 +15,9 @@ memcmp configure.ac: gl_FUNC_MEMMEM_SIMPLE +if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then + AC_LIBOBJ([memmem]) +fi gl_STRING_MODULE_INDICATOR([memmem]) Makefile.am: |