diff options
author | unknown <antony@ltantony.mysql.com> | 2005-05-08 01:18:19 +0100 |
---|---|---|
committer | unknown <antony@ltantony.mysql.com> | 2005-05-08 01:18:19 +0100 |
commit | cf664e752b0238b595c3ed85715a5121aad688ad (patch) | |
tree | efbc9eed5ab601b0f15d565be9e6ba05addb2806 /BUILD | |
parent | d64f8b3d284d4394645e396a5953dc3f808a6f6d (diff) | |
download | mariadb-git-cf664e752b0238b595c3ed85715a5121aad688ad.tar.gz |
FreeBSD doesn't have /proc/cpuinfo, use sysctl to find cpu model.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'BUILD')
-rwxr-xr-x | BUILD/check-cpu | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/BUILD/check-cpu b/BUILD/check-cpu index 553df39191f..ce106e5a603 100755 --- a/BUILD/check-cpu +++ b/BUILD/check-cpu @@ -19,6 +19,18 @@ if test -r /proc/cpuinfo ; then if test -z "$model_name" ; then model_name=`uname -m` fi +else + # Fallback when there is no /proc/cpuinfo + case "`uname -s`" in + FreeBSD) + cpu_family=`uname -m`; + model_name=`sysctl -b hw.model` + ;; + *) + cpu_family=`uname -m`; + model_name="unknown"; + ;; + esac fi case "$cpu_family--$model_name" in |