strdup, strdup-posix: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sun, 22 May 2011 11:16:19 +0000 (13:16 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:50 +0000 (00:06 +0200)
* 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
m4/strdup.m4
modules/strdup
modules/strdup-posix

index ac5b09a76207b2a6ff8b20f3232f88882dd2c79e..a40b96ec60200a456343605a409cdd27d70c22a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        strcspn: Move AC_LIBOBJ invocations to module description.
index 3fb36dd9ae2cfcb5053c74be80d1906ab3498c02..d744ad5af8512e482b2633fb263418ba8336235e 100644 (file)
@@ -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
index 8da96a230ca0abb7aa8be50dfa82a0fcafd2dc3d..619ec01e930654760c174290e550e1896a1a7abb 100644 (file)
@@ -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:
index d158873fbe897cef82bf9e1e43d952602fa7d341..846baf2eb81aa235d66e565c838a3eb9b6af5939 100644 (file)
@@ -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: