We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
uname -m
1 parent 106216d commit f8514d9Copy full SHA for f8514d9
configure
@@ -127,7 +127,17 @@ need_cmd sed
127
msg "inspecting environment"
128
129
CFG_OSTYPE=$(uname -s)
130
+
131
CFG_CPUTYPE=$(uname -m)
132
+if [ $CFG_OSTYPE = Darwin -a $CFG_CPUTYPE = i386 ]
133
+then
134
+ # Darwin's `uname -s` lies and always returns i386. We have to use sysctl
135
+ # instead.
136
+ if sysctl hw.optional.x86_64 | grep ': 1'
137
+ then
138
+ CFG_CPUTYPE=x86_64
139
+ fi
140
+fi
141
142
CFG_SELF=$(echo $0 | tr '\\' '/')
143
CFG_SRC_DIR=${CFG_SELF%${CFG_SELF##*/}}
0 commit comments