getdelim: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sun, 8 May 2011 09:32:02 +0000 (11:32 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:03 +0000 (00:06 +0200)
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Set HAVE_GETDELIM. Move AC_LIBOBJ
and gl_PREREQ_GETDELIM invocations from here...
* modules/getdelim (configure.ac): ... to here.
(Depends-on): Fix condition.

ChangeLog
m4/getdelim.m4
modules/getdelim

index df46330..1047020 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-05-08  Bruno Haible  <bruno@clisp.org>
 
+       getdelim: Move AC_LIBOBJ invocations to module description.
+       * m4/getdelim.m4 (gl_FUNC_GETDELIM): Set HAVE_GETDELIM. Move AC_LIBOBJ
+       and gl_PREREQ_GETDELIM invocations from here...
+       * modules/getdelim (configure.ac): ... to here.
+       (Depends-on): Fix condition.
+
+2011-05-08  Bruno Haible  <bruno@clisp.org>
+
        getcwd: Move AC_LIBOBJ invocations to module description.
        * m4/getcwd.m4 (gl_FUNC_GETCWD): Move AC_LIBOBJ and gl_PREREQ_GETCWD
        invocations from here...
index ef12736..6a0f632 100644 (file)
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 8
+# getdelim.m4 serial 9
 
 dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
 dnl
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
 
   AC_CHECK_FUNCS_ONCE([getdelim])
   if test $ac_cv_func_getdelim = yes; then
+    HAVE_GETDELIM=1
     dnl Found it in some library.  Verify that it works.
     AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim],
     [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
@@ -65,21 +66,16 @@ AC_DEFUN([gl_FUNC_GETDELIM],
          [gl_cv_func_working_getdelim=yes],
          [gl_cv_func_working_getdelim=no])]
     )])
+    if test $gl_cv_func_working_getdelim = no; then
+      REPLACE_GETDELIM=1
+    fi
   else
-    gl_cv_func_working_getdelim=no
+    HAVE_GETDELIM=0
   fi
 
   if test $ac_cv_have_decl_getdelim = no; then
     HAVE_DECL_GETDELIM=0
   fi
-
-  if test $gl_cv_func_working_getdelim = no; then
-    if test $ac_cv_func_getdelim = yes; then
-      REPLACE_GETDELIM=1
-    fi
-    AC_LIBOBJ([getdelim])
-    gl_PREREQ_GETDELIM
-  fi
 ])
 
 # Prerequisites of lib/getdelim.c.
index c3ef317..e84558c 100644 (file)
@@ -8,12 +8,16 @@ m4/getdelim.m4
 Depends-on:
 stdio
 extensions
-stdint          [test $HAVE_DECL_GETDELIM = 0 || test $REPLACE_GETDELIM = 1]
-realloc-posix   [test $HAVE_DECL_GETDELIM = 0 || test $REPLACE_GETDELIM = 1]
-errno           [test $HAVE_DECL_GETDELIM = 0 || test $REPLACE_GETDELIM = 1]
+stdint          [test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1]
+realloc-posix   [test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1]
+errno           [test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1]
 
 configure.ac:
 gl_FUNC_GETDELIM
+if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
+  AC_LIBOBJ([getdelim])
+  gl_PREREQ_GETDELIM
+fi
 gl_STDIO_MODULE_INDICATOR([getdelim])
 
 Makefile.am: