bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] Re: getline AC_LIBOBJs


From: Paul Eggert
Subject: [Bug-gnulib] Re: getline AC_LIBOBJs
Date: 23 Oct 2003 11:47:34 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Unfortunately that patch would break coreutils, since the
AC_REQUIRE([gl_GETNDELIM2]) in coreutils would have no effect if
AM_FUNC_GETLINE were modified to conditionally invoke gl_GETNDELIM2,
andd hence coreutils wouldn't work on hosts that have getline but lack
getndelim2.

I installed this more-conservative-but-uglier patch instead.

Maybe this is a symptom of a more general problem?  Should coreutils
be saying just "gl_FOO" rather than AC_REQUIRE([gl_FOO])?  (I wish
these dependency issues weren't so confusing!)

2003-10-23  Paul Eggert  <address@hidden>

        * getline.m4 (AM_FUNC_GETLINE):
        Don't include getndelim2.o twice into LIBOBJS; this breaks on some
        hosts.  Problem reported by Derek Robert Price in
        <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
        This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
        * getndelim2.m4 (gl_GETNDELIM2): Likewise.

Index: m4/getline.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/getline.m4,v
retrieving revision 1.12
diff -p -u -r1.12 getline.m4
--- m4/getline.m4       18 Jul 2003 16:58:06 -0000      1.12
+++ m4/getline.m4       23 Oct 2003 18:36:38 -0000
@@ -1,4 +1,4 @@
-# getline.m4 serial 9
+# getline.m4 serial 10
 
 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
 dnl Foundation, Inc.
@@ -56,7 +56,14 @@ AC_DEFUN([AM_FUNC_GETLINE],
     AC_DEFINE([getline], [gnu_getline],
       [Define to a replacement function name for getline().])
     AC_LIBOBJ(getline)
-    AC_LIBOBJ(getndelim2)
+
+    # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
+    # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
+    case " $LIB@&address@hidden " in
+    *" getndelim2.$ac_objext "* ) ;;
+    *) AC_LIBOBJ(getndelim2);;
+    esac
+
     gl_PREREQ_GETLINE
     gl_PREREQ_GETNDELIM2
   fi
Index: m4/getndelim2.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/getndelim2.m4,v
retrieving revision 1.3
diff -p -u -r1.3 getndelim2.m4
--- m4/getndelim2.m4    9 Sep 2003 07:31:58 -0000       1.3
+++ m4/getndelim2.m4    23 Oct 2003 18:36:38 -0000
@@ -1,4 +1,4 @@
-# getndelim2.m4 serial 2
+# getndelim2.m4 serial 3
 dnl Copyright (C) 2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -8,7 +8,13 @@ dnl the same distribution terms as the r
 
 AC_DEFUN([gl_GETNDELIM2],
 [
-  AC_LIBOBJ(getndelim2)
+  # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
+  # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
+  case " $LIB@&address@hidden " in
+  *" getndelim2.$ac_objext "* ) ;;
+  *) AC_LIBOBJ(getndelim2);;
+  esac
+
   gl_PREREQ_GETNDELIM2
 ])
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]