-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigMac.sh
executable file
·42 lines (34 loc) · 1.08 KB
/
configMac.sh
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
#! /bin/sh
# --------------------
# Notice
# --------------------
# This configure shell script helps doing configure for llvm-gcc if
# your system changed gcc to hpc-gcc.
if [ ! -e configure ];then
echo "configure stopped,"
echo "need to generate configure first by autogen.sh !"
exit 0
fi
COMPILER="CC=llvm-gcc CXX=llvm-g++"
FEATURES="--enable-localjpeg --enable-localzlib --enable-localpng"
OPTIONS=
KVER_0=`uname -r | cut -d . -f1`
KVER_1=`uname -r | cut -d . -f2`
KVER_2=`uname -r | cut -d . -f3`
KVER_A=`uname -m`
echo "Darwin Kernel version identified ${KVER_0}.${KVER_1}.${KVER_2}, architecture : ${KVER_A}"
# Sens kernel version ...
# -----------------------
# ~ 18.x : Mojave
# 19.x : Catalina
# 20.x : Big Sur ( Supporting arm64 archicture )
# 21.x : Monterey
# 22.x : Ventura
if [ "$1" == "macOS11compatible" ];then
OPTIONS="${OPTIONS} -mmacosx-version-min=11.0"
fi
if [ ${KVER_0} -gt 19 ];then
echo "Setting for universal binary for Big Sur"
export ARCHFLAGS="-arch x86_64 -arch arm64 ${OPTIONS}"
fi
./configure ${FEATURES} ${COMPILER} ${FLTKABI}