diff options
author | tege <tege@gmplib.org> | 2000-03-07 20:16:00 +0100 |
---|---|---|
committer | tege <tege@gmplib.org> | 2000-03-07 20:16:00 +0100 |
commit | d3b53c22dc10acda46928c1efcfeaa53abd71336 (patch) | |
tree | f32624433fabaac208586b8fa32eb423425e6497 /config.guess | |
parent | 4c27fa492f74ae68840b0eafd940264e138593bd (diff) | |
download | gmp-d3b53c22dc10acda46928c1efcfeaa53abd71336.tar.gz |
Better recognize POWER/PowerPC processor type.
Diffstat (limited to 'config.guess')
-rwxr-xr-x | config.guess | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/config.guess b/config.guess index 38e9784c6..7705c348d 100755 --- a/config.guess +++ b/config.guess @@ -467,11 +467,27 @@ EOF fi exit 0 ;; *:AIX:*:4) - if /usr/sbin/lsattr -EHl proc0 | grep PowerPC >/dev/null 2>&1; then - IBM_ARCH=powerpc - else - IBM_ARCH=rs6000 - fi + sed 's/^ //' << EOF >dummy.c + #include <stdio.h> + #include <sys/systemcfg.h> + main () + { + if (_system_configuration.architecture == POWER_RS + || _system_configuration.implementation == POWER_601) + puts ("power"); + else + { + if (_system_configuration.width == 64) + puts ("powerpc64"); + else + puts ("powerpc"); + } + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy + IBM_ARCH=`./dummy` + rm -f dummy.c dummy if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else |