libtool-patches
[Top][All Lists]
Advanced

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

libtool-1.5 causes malfunctioning of 'aclocal'


From: Bruno Haible
Subject: libtool-1.5 causes malfunctioning of 'aclocal'
Date: Fri, 25 Apr 2003 16:38:02 +0200 (CEST)

Hi,

Installation of libtool-1.5 causes severe collateral damage to the automake
package: its 'aclocal' program starts producing incorrect aclocal.m4 files
for *all* configure.{ac,in} files that - directly or indirectly - use
AC_PROG_EGREP. The damage is that these generated aclocal.m4 files will
contain a copy of libtool-1.5's libtool.m4, with two bad consequences:

  - If the package does not need libtool, aclocal.m4 is simply too
    large by 200 KB.
  - If the package uses a different version of libtool (say, it ships
    with libtool.m4 from libtool-1.4.3 in its private m4/ directory),
    the aclocal.m4 will contain two different copies of libtool.m4,
    and it is random which one will be used by autoconf. Thus the
    generated configure file will be wrong.


How to reproduce:

- Install libtool-1.5 with the same --prefix as you earlier installed
  automake (1.7.3 or so).

- In an empty directory, store configure.ac,
================================ configure.ac ================================
AC_INIT
AC_PROG_CC
AC_PROG_LIBTOOL
AC_PROG_EGREP
AC_OUTPUT
==============================================================================

$ mkdir m4; cp .../libtool-1.4.3/libtool.m4 m4/libtool.m4

$ aclocal -I m4

$ grep 'serial.*AC_PROG_LIBTOOL' aclocal.m4 
# serial 46 AC_PROG_LIBTOOL
# serial 47 AC_PROG_LIBTOOL

serial 46 comes from libtool-1.4.3.
serial 47 comes from libtool-1.5.

$ autoconf

Look at the generated configure, it contains material from libtool-1.5.


Here is a patch that fixes it.

2003-04-25  Bruno Haible  <address@hidden>

        * libtool.m4 (AC_PROG_EGREP): Hide from aclocal.

*** libtool.m4.bak      2003-04-16 00:04:34.000000000 +0200
--- libtool.m4  2003-04-25 00:31:22.000000000 +0200
***************
*** 1839,1845 ****
  # -------------
  # This is predefined starting with Autoconf 2.54, so this conditional
  # definition can be removed once we require Autoconf 2.54 or later.
! m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
     [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
      then ac_cv_prog_egrep='grep -E'
--- 1839,1846 ----
  # -------------
  # This is predefined starting with Autoconf 2.54, so this conditional
  # definition can be removed once we require Autoconf 2.54 or later.
! # Note that we must hide the name AC_PROG_EGREP from 'aclocal'.
! m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_][PROG_EGREP],
  [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
     [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
      then ac_cv_prog_egrep='grep -E'


This is a severe bug; I suggest that you release a libtool-1.5.1 fixing this
blunder as soon as possible.

Bruno




reply via email to

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