Ticket #2951: 0001-fix-config.guess-to-correctly-detect-i386-pc-solaris.patch

File 0001-fix-config.guess-to-correctly-detect-i386-pc-solaris.patch, 1.5 KB (added by kgardas, 5 years ago)

Fix config.guess to correctly detect i386-pc-solaris platform

  • config.guess

    From 67919a77840891b71a0e39641f358e7903db2a42 Mon Sep 17 00:00:00 2001
    From: Karel Gardas <karel.gardas@centrum.cz>
    Date: Tue, 27 Jan 2009 10:29:24 +0100
    Subject: [PATCH] fix config.guess to correctly detect i386-pc-solaris platform even if
     run by bash (called by configure script usually)
    
    ---
     config.guess |   12 +++++++++++-
     1 files changed, 11 insertions(+), 1 deletions(-)
    
    diff --git a/config.guess b/config.guess
    index 7b24a87..463a03a 100755
    a b case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 
    337337        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 
    338338        # This test works for both compilers. 
    339339        if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 
    340             if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \ 
     340            # bash is not able to generate correct code here 
     341            # i.e. it leaves \ns there 
     342            # so we need to use /usr/bin/echo to get what we want 
     343            # note that if config.guess is run by /bin/sh then 
     344            # this works as expected even without /usr/bin/echo 
     345            # but the problem is that configure is clever enough 
     346            # to find bash installed and then runs config.guess 
     347            # by bash instead of by /bin/sh 
     348            # It seems that using /usr/bin/echo here is the most 
     349            # portable Solaris fix 
     350            if /usr/bin/echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \ 
    341351                (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 
    342352                grep IS_64BIT_ARCH >/dev/null 
    343353            then