delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/26/19:04:54

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
To: <djgpp-workers AT delorie DOT com>
Subject: Re: RFD - UNAME_MACHINE ?
Date: Thu, 27 Dec 2001 01:04:48 +0100
Message-ID: <000801c18e6a$195f2d30$cef8e0d5@zastaixp>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3416
In-reply-to: <200112262231.fBQMVYf18459@envy.delorie.com>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Are the problems with ./configure?  It should take a host triple on
> the command line to override what uname tells it:
> 
> ./configure i586-pc-msdosdjgpp

Agreed.  Well-behaved configure scripts should use what they get
from autoconf, and not by running uname themselves.  And autoconf
takes its settings from the command line, falling back on
config.guess (which calls uname to detect DJGPP).

In fact, I think simply updating the package's config.guess should be
enough; the config.guess in my automake CVS tree (not updated in a
month or two has:


UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown

# Note: order is significant - the case branches are not exclusive.

case
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
[snip]
    i*86:*DOS:*:*)
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
        exit 0 ;;
    pc:*:*:*)
        # Left here for compatibility:
        # uname -m prints for DJGPP always 'pc', but it prints nothing
about
        # the processor, so we play safe by assuming i386.
        echo i386-pc-msdosdjgpp
        exit 0 ;;
[snip]


So it would seem to support both types of uname.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019