From: Bruno Haible Date: Sun, 22 May 2011 11:16:19 +0000 (+0200) Subject: strdup, strdup-posix: Move AC_LIBOBJ invocations to module description. X-Git-Tag: v0.1~2422 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=0e6b5ce1855093a1e0341ac29ea40d7623807a5b;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index ac5b09a76..a40b96ec6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 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. * m4/strcspn.m4 (gl_FUNC_STRCSPN): Call AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRCSPN invocations from diff --git a/m4/strdup.m4 b/m4/strdup.m4 index 3fb36dd9a..d744ad5af 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 8da96a230..619ec01e9 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 d158873fb..846baf2eb 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: