summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2005-02-17 07:11:59 +0000
committergrant <grant@pkgsrc.org>2005-02-17 07:11:59 +0000
commit581576f963aa2d9a02e32ff3c32c31f49ae5cef4 (patch)
tree0edf2c25971f47b2e99561521c893d3e902e1e3b /mk
parent1b4356bcb800a8473b1061f247aa51c2b1b15c6a (diff)
downloadpkgsrc-581576f963aa2d9a02e32ff3c32c31f49ae5cef4.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')
-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