From 0e6b5ce1855093a1e0341ac29ea40d7623807a5b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 May 2011 13:16:19 +0200 Subject: [PATCH] strdup, strdup-posix: Move AC_LIBOBJ invocations to module description. * m4/strdup.m4 (gl_FUNC_STRDUP): Move AC_LIBOBJ and gl_PREREQ_STRDUP invocations from here... * modules/strdup (configure.ac): ... to here. * modules/strdup-posix (configure.ac): ... and here. --- ChangeLog | 8 ++++++++ m4/strdup.m4 | 11 +---------- modules/strdup | 4 ++++ modules/strdup-posix | 4 ++++ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac5b09a762..a40b96ec60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-05-22 Bruno Haible + + strdup, strdup-posix: Move AC_LIBOBJ invocations to module description. + * m4/strdup.m4 (gl_FUNC_STRDUP): Move AC_LIBOBJ and gl_PREREQ_STRDUP + invocations from here... + * modules/strdup (configure.ac): ... to here. + * modules/strdup-posix (configure.ac): ... and here. + 2011-05-22 Bruno Haible strcspn: Move AC_LIBOBJ invocations to module description. diff --git a/m4/strdup.m4 b/m4/strdup.m4 index 3fb36dd9ae..d744ad5af8 100644 --- a/m4/strdup.m4 +++ b/m4/strdup.m4 @@ -1,4 +1,4 @@ -# strdup.m4 serial 12 +# strdup.m4 serial 13 dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. @@ -10,10 +10,6 @@ AC_DEFUN([gl_FUNC_STRDUP], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([strdup]) - if test $ac_cv_func_strdup != yes; then - AC_LIBOBJ([strdup]) - gl_PREREQ_STRDUP - fi AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 @@ -28,12 +24,7 @@ AC_DEFUN([gl_FUNC_STRDUP_POSIX], if test $ac_cv_func_strdup = yes; then if test $gl_cv_func_malloc_posix != yes; then REPLACE_STRDUP=1 - AC_LIBOBJ([strdup]) - gl_PREREQ_STRDUP fi - else - AC_LIBOBJ([strdup]) - gl_PREREQ_STRDUP fi AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then diff --git a/modules/strdup b/modules/strdup index 8da96a230c..619ec01e93 100644 --- a/modules/strdup +++ b/modules/strdup @@ -16,6 +16,10 @@ string configure.ac: gl_FUNC_STRDUP +if test $ac_cv_func_strdup = no; then + AC_LIBOBJ([strdup]) + gl_PREREQ_STRDUP +fi gl_STRING_MODULE_INDICATOR([strdup]) Makefile.am: diff --git a/modules/strdup-posix b/modules/strdup-posix index d158873fbe..846baf2eb8 100644 --- a/modules/strdup-posix +++ b/modules/strdup-posix @@ -11,6 +11,10 @@ malloc-posix [test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1] configure.ac: gl_FUNC_STRDUP_POSIX +if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then + AC_LIBOBJ([strdup]) + gl_PREREQ_STRDUP +fi gl_STRING_MODULE_INDICATOR([strdup]) Makefile.am: -- 2.30.2