summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gnu.org>1995-06-28 21:57:23 +0000
committerRichard Kenner <kenner@gnu.org>1995-06-28 21:57:23 +0000
commite7233b09e923529da0dafb62513ed156a004200e (patch)
treeedbc8a33e5724d220b381df625019855c8bc32fd
parentdbd71bf2c205e624b705b67c7f64b674e37329d8 (diff)
downloadglibc-e7233b09e923529da0dafb62513ed156a004200e.tar.gz
glibc-e7233b09e923529da0dafb62513ed156a004200e.tar.xz
glibc-e7233b09e923529da0dafb62513ed156a004200e.zip
(AIX4): More robust release numbering discovery.
-rwxr-xr-xconfig.guess23
1 files changed, 18 insertions, 5 deletions
diff --git a/config.guess b/config.guess
index 478c406074..51d040c285 100755
--- a/config.guess
+++ b/config.guess
@@ -187,10 +187,8 @@ EOF
 	else
 		IBM_ARCH=powerpc
 	fi
-	if grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then
-		IBM_REV=4.1
-	elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then
-		IBM_REV=4.1.1
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
 	else
 		IBM_REV=4.${UNAME_RELEASE}
 	fi
@@ -422,6 +420,10 @@ esac
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
 cat >dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
 main ()
 {
 #if defined (sony)
@@ -485,7 +487,18 @@ main ()
 #endif
 
 #if defined (_SEQUENT_)
-  printf ("i386-sequent-ptx\n"); exit (0);
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
 #endif
 
 #if defined (vax)