[Top][All Lists]

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

Re: libtool shell feature checks run with wrong shell

From: Ralf Wildenhues
Subject: Re: libtool shell feature checks run with wrong shell
Date: Tue, 5 Feb 2008 23:45:37 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

* Clint Adams wrote on Wed, Jan 30, 2008 at 08:19:22PM CET:
> On Wed, Jan 16, 2008 at 08:59:46PM +0100, Ralf Wildenhues wrote:
> > Let's find out what the differences in the setups are.  Which version
> > of dash?  Which m4 and autoconf versions were used to bootstrap the
> > package in question?  BTW, which package is this that this happened
> > with, libtool or some libtool-using one?
> Sorry, I seem to have missed this message.  The package in question is
> fakeroot 1.9.1.
> autoconf 2.61-5
> automake 1:1.10+nogfdl-1
> dash 0.5.4-6
> libtool 2.1a+cvs1.2460+20070510-1
> m4 1.4.10-1

Confirmed.  Thanks for the information.  This is a bug in fakeroot
rather than in libtool.  Well, probably it's under-documentation in

Point is, both the current Libtool and Autoconf code assume that the
configure.ac author does not mess with $SHELL, and certainly should not
mess with it late in the script.  Unfortunately, however, Autoconf also
does not provide a public interface to give additional requirements on
the shell.  The patch below uses an undocumented interface, but this may
easily break with a different Autoconf version than the one I tried it

Actually, I think the safer approach would be to just delete the test
completely, and let the user sort it out on Solaris manually by
  CONFIG_SHELL=/bin/bash; export CONFIG_SHELL
  $CONFIG_SHELL ./configure ...

Hope that helps.


2008-02-05  Ralf Wildenhues  <address@hidden>

        * configure.ac: Do not override $SHELL late in configure.ac.
        Use undocumented Autoconf interface _AS_DETECT_SUGGESTED to
        require $(...) command replacement.

--- configure.ac.orig   2008-02-05 23:30:12.000000000 +0100
+++ configure.ac        2008-02-05 23:39:34.000000000 +0100
@@ -482,21 +482,9 @@
 dnl kludge end
 dnl check for b0rked Solaris (and other shells) and find one that works
-AC_MSG_CHECKING(for a working shell...)
-for i in /usr/xpg6/bin/sh /usr/xpg4/bin/sh /usr/ccs/bin/sh /bin/sh /usr/bin/sh 
/bin/ksh /bin/bash /usr/local/bin/bash ; do
-    $i -c 'if ! false ; then echo $(echo ok) ; fi' >config.$$ 2>/dev/null
-    j=`cat config.$$`
-    rm -f config.$$
-    if test "x$j" = "xok" ; then
-        SHELL=$i
-        AC_SUBST(SHELL)
-        break
-    fi
-if test "x$SHELL" = "x" ; then
-    AC_MSG_ERROR(no SUS compliant shell found - on Solaris, install SUNWxcu4)
+_AS_DETECT_SUGGESTED([echo $(echo ok) > config.$$ 2>/dev/null
+                     j=`cat config.$$`; rm -f config.$$
+                     test "x$j" = "xok"])
 case "$target_cpu:$target_os" in

reply via email to

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