./configure bug with Linux/ppc

When trying to compile the CVS version of Ruby under Yellowdog
Linux/ppc, config.guess determines that the host architecture is
"powerpc-unknown-linux-" (note the trailing dash). This causes
./configure to be confused and unable to proceed. All 1.6 versions of
ruby return “powerpc-unknown-linux” from config.guess, which works.

In comparing the two versions of config.guess I notice that the CVS
version has this:

ppc:Linux:*:*)
            # Determine Lib Version
            cat >$dummy.c <<EOF

… code to determine value of LIBC …

    echo powerpc-unknown-linux-${LIBC}
    exit 0 ;;

while the 1.6 version of config.guess has this:

ppc:Linux:*:*)
            # Determine Lib Version
            cat >$dummy.c <<EOF

… code to determine value of LIBC …

    echo powerpc-unknown-linux${LIBC}
    exit 0 ;;

This makes a difference, because the value of LIBC turns out to be “”
(null string).

I took out the dash, and it compiled without a problem.

I’m not sure what the right solution to the problem is; I’m reporting
it here in case someone else does.

–Mirian

Hi,

Mirian Crzig Lennox mirian@cosmic.com writes:

ppc:Linux:*:*)
            # Determine Lib Version
            cat >$dummy.c <<EOF

… code to determine value of LIBC …

    echo powerpc-unknown-linux${LIBC}
    exit 0 ;;

This makes a difference, because the value of LIBC turns out to be “”
(null string).

I took out the dash, and it compiled without a problem.

I’m not sure what the right solution to the problem is; I’m reporting
it here in case someone else does.

Applied. Thanks.

···


eban

Index: config.guess

RCS file: /src/ruby/config.guess,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -1 -r1.10 -r1.11
— config.guess 2001/10/03 07:19:10 1.10
+++ config.guess 2002/09/01 06:58:09 1.11
@@ -828,6 +828,6 @@
./$dummy | grep 1.99 > /dev/null

  •   if test "$?" = 0 ; then LIBC="libc1" ; fi
    
  •   if test "$?" = 0 ; then LIBC="-libc1" ; fi
      fi	
      rm -f $dummy.c $dummy
    
  • echo powerpc-unknown-linux-${LIBC}
  • echo powerpc-unknown-linux${LIBC}
    exit 0 ;;