summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
diff options
context:
space:
mode:
authorgrant <grant>2005-02-17 07:11:59 +0000
committergrant <grant>2005-02-17 07:11:59 +0000
commitb3d51e0a6d2df92d8ad4419f3c4111a9de083a70 (patch)
tree0edf2c25971f47b2e99561521c893d3e902e1e3b /mk/bsd.prefs.mk
parent4c1e0c75fc7c812aa921e9555bd5b4e7114d24a8 (diff)
downloadpkgsrc-b3d51e0a6d2df92d8ad4419f3c4111a9de083a70.tar.gz
add bits for AIX to correctly set MACHINE_ARCH and OS_VERSION, so that
MACHINE_GNU_PLATFORM is set to something sane. tested with AIX 4.3.3 and 5.1.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r--mk/bsd.prefs.mk21
1 files changed, 20 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 1522c157679..c59aa2df4da 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.180 2005/02/11 16:11:36 tv Exp $
+# $NetBSD: bsd.prefs.mk,v 1.181 2005/02/17 07:11:59 grant Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -172,6 +172,25 @@ OS_VERSION!= echo ${OS_VERSION} | sed -e 's/^V//'
LOWER_OPSYS?= osf${OS_VERSION}
LOWER_VENDOR?= dec
+.elif ${OPSYS} == "AIX"
+LOWER_ARCH!= _cpuid=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $$1 }'`; \
+ if /usr/sbin/lsattr -El $$_cpuid | grep ' POWER' >/dev/null 2>&1; then \
+ echo rs6000; \
+ else \
+ echo powerpc; \
+ fi
+MACHINE_ARCH?= ${LOWER_ARCH}
+. if exists(/usr/bin/oslevel)
+_OS_VERSION!= /usr/bin/oslevel
+. else
+_OS_VERSION!= echo `${UNAME} -v`.`${UNAME} -r`
+. endif
+OS_VERSION!= echo ${_OS_VERSION} | sed -e 's,\([0-9]*\.[0-9]*\).*,\1,'
+LOWER_OS_VERSION= ${OS_VERSION}
+LOWER_OPSYS_VERSUFFIX= ${_OS_VERSION}
+LOWER_OPSYS?= aix
+LOWER_VENDOR?= ibm
+
.elif !defined(LOWER_OPSYS)
LOWER_OPSYS!= echo ${OPSYS} | tr A-Z a-z
.endif