-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure-universalDarwin
92 lines (79 loc) · 2.13 KB
/
configure-universalDarwin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#! /bin/bash
# $Id: configure-universalDarwin,v 1.9 2020/05/03 21:38:10 mp Exp $
# run configure (or ../configure) for universalDarwinNN
# NN=8 Mac OS X 10.4 Tiger
# NN=9 Mac OS X 10.5 Leopard
# NN=10 Mac OS X 10.6 Snow Leopard
# NN=11 Mac OS X 10.7 Lion
# NN=12 OS X 10.8 Mountain Lion
# NN=13 OS X 10.9 Mavericks
# NN=14 OS X 10.10 Yosemite
# NN=15 OS X 10.11 El Capitan
# NN=16 macOS 10.12 Sierra
# NN=17 macOS 10.13 High Sierra
# NN=18 macOS 10.14 Mojave
# NN=19 macOS 10.15 Catalina
# This file exists separately for autodock and autogrid but should be identical
osrev=$(uname -r) # example 9.8.0 is Darwin 9.8 or Mac OS 10.9.8
ver=${osrev%%.*} # example 9 is Darwin 9
if [ -x configure ]; then
config=configure
elif [ -x ../configure ]; then
config=../configure
else
echo $0 cannot find configure script
exit 1
fi
# note that 10,11,12,... are Intel only
case $ver in
*8)
# Tiger (Intel/PPC; only 32-bit is supported here)
archlist="-arch i386 -arch ppc"
sdkver=4u
;;
*9)
# Leopard (Intel/PPC; 32/64-bit)
archlist="-arch i386 -arch x86_64 -arch ppc -arch ppc64"
sdkver=5
;;
*10)
# Snow Leopard (Intel 32/64-bit)
archlist="-arch i386 -arch x86_64"
sdkver=6
;;
*11)
# Lion (Intel 32/64-bit)
archlist="-arch i386 -arch x86_64"
sdkver=7
sdkver=0 # hack for TSRI since our only 10.7 machine has no SDK dir
;;
*1[2-9])
# Mountain Lion, Mavericks, Yosemite, El Capitan, Sierra, ... Catalina
# (Intel 64-bit)
archlist="-arch x86_64"
sdkver=0 # seems no longer needed
;;
*)
echo $0 unrecogized Darwin version $ver \( osrev = $osrev \)
exit 1
;;
esac
configopts="--disable-dependency-tracking"
if [ $sdkver != 0 ]; then
rootdir=/Developer/SDKs/MacOSX10.$sdkver.sdk
isysroot="-isysroot $rootdir"
else
rootdir=/usr
isysroot=""
fi
if [ ! -d $rootdir ]; then
echo Cannot find developer tool directory $rootdir
echo "Please download \"Developer Tools\" from apple.com."
exit 1
fi
echo running env CXXFLAGS="-O3 $isysroot $archlist" \
LDFLAGS="$archlist" \
$config $configopts
env CXX=clang CXXFLAGS="-Xpreprocessor -fopenmp -O3 $isysroot $archlist" \
LDFLAGS="$archlist -lomp -lc++" \
$config $configopts