-
Notifications
You must be signed in to change notification settings - Fork 66
/
aclocal.m4
148 lines (114 loc) · 2.47 KB
/
aclocal.m4
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
AC_DEFUN([DUTI_CHECK_SDK],
[
AC_MSG_CHECKING(which SDK to use)
AC_ARG_WITH(macosx-sdk,
AC_HELP_STRING([--with-macosx-sdk=DIR], [path to SDK]),
macosx_sdk="$withval")
sdk_path="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs"
macosx_arches="-arch i386 -arch x86_64"
case "${host_os}" in
darwin8*)
sdk_path="/Developer/SDKs/MacOSX10.4u.sdk"
macosx_arches=""
;;
darwin9*)
sdk_path="/Developer/SDKs/MacOSX10.5.sdk"
;;
darwin10*)
sdk_path="/Developer/SDKs/MacOSX10.6.sdk"
;;
darwin11*)
sdk_path="${sdk_path}/MacOSX10.7.sdk"
;;
darwin12*)
sdk_path="${sdk_path}/MacOSX10.8.sdk"
;;
darwin13*)
sdk_path="${sdk_path}/MacOSX10.9.sdk"
macosx_arches=""
;;
darwin14*)
sdk_path="${sdk_path}/MacOSX10.10.sdk"
macosx_arches=""
;;
darwin15*|darwin16*|darwin17*|darwin18*)
sdk_path="${sdk_path}/MacOSX.sdk"
macosx_arches=""
;;
darwin19*)
sdk_path="${sdk_path}/MacOSX.sdk"
macosx_arches="-arch x86_64"
;;
darwin20*|darwin21*|darwin22*)
sdk_path="${sdk_path}/MacOSX.sdk"
macosx_arches="-arch x86_64 -arch arm64"
;;
*)
AC_MSG_ERROR([${host_os} is not a supported system])
esac
if test -z "$macosx_sdk"; then
macosx_sdk=$sdk_path
fi
AC_SUBST(macosx_arches)
AC_SUBST(macosx_sdk)
AC_MSG_RESULT($macosx_sdk)
])
AC_DEFUN([DUTI_CHECK_DEPLOYMENT_TARGET],
[
AC_MSG_CHECKING(Mac OS X deployment target)
AC_ARG_WITH(macosx-deployment-target,
AC_HELP_STRING([--with-macosx-deployment-target=VERSION],
[OS version]), macosx_dep_target="$withval")
case "${host_os}" in
darwin8*)
dep_target="10.4"
;;
darwin9*)
dep_target="10.5"
;;
darwin10*)
dep_target="10.6"
;;
darwin11*)
dep_target="10.7"
;;
darwin12*)
dep_target="10.8"
;;
darwin13*)
dep_target="10.9"
;;
darwin14*)
dep_target="10.10"
;;
darwin15*)
dep_target="10.11"
;;
darwin16*)
dep_target="10.12"
;;
darwin17*)
dep_target="10.13"
;;
darwin18*)
dep_target="10.14"
;;
darwin19*)
dep_target="10.15"
;;
darwin20*)
dep_target="11"
;;
darwin21*)
dep_target="12"
;;
darwin22*)
dep_target="13"
;;
esac
if test -z "$macosx_dep_target"; then
macosx_dep_target=$dep_target
fi
AC_SUBST(macosx_dep_target)
AC_MSG_RESULT($macosx_dep_target)
])