10
10
# Generic, cross-platform CFLAGS you always want go here.
11
11
CFLAGS="-O3 -g -pipe"
13
# PowerPC configure flags (10.2 runtime compatibility)
14
# We dynamically load X11, so using the system X11 headers is fine.
15
CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
16
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
18
# PowerPC compiler flags
19
CC_PPC="gcc-3.3 -arch ppc"
20
CXX_PPC="g++-3.3 -arch ppc"
22
CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
24
-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
25
-I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
26
-isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include"
28
# PowerPC linker flags
29
LFLAGS_PPC="-arch ppc \
30
-L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
31
-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
32
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"
13
# Locate Xcode SDK path
14
SDK_PATH=/Developer/SDKs
15
if [ ! -d $SDK_PATH ]; then
16
echo "Couldn't find SDK path"
20
# See if we can use 10.2 or 10.3 runtime compatibility
21
if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then
22
# PowerPC configure flags (10.2 runtime compatibility)
23
# We dynamically load X11, so using the system X11 headers is fine.
24
CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
25
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
27
# PowerPC compiler flags
28
CC_PPC="gcc-3.3 -arch ppc"
29
CXX_PPC="g++-3.3 -arch ppc"
31
CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
33
-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
34
-I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
35
-isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include"
37
# PowerPC linker flags
38
LFLAGS_PPC="-arch ppc \
39
-L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
40
-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
41
-Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk"
43
else # 10.2 or 10.3 SDK
45
# PowerPC configure flags (10.3 runtime compatibility)
46
# We dynamically load X11, so using the system X11 headers is fine.
47
CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
48
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
50
# PowerPC compiler flags
51
CC_PPC="gcc-4.0 -arch ppc"
52
CXX_PPC="g++-4.0 -arch ppc"
54
CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
56
-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
57
-I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
58
-isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include"
60
# PowerPC linker flags
61
LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \
62
-L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
63
-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
64
-Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk"
34
68
# Intel configure flags (10.4 runtime compatibility)
35
69
# We dynamically load X11, so using the system X11 headers is fine.
42
76
CFLAGS_X86="-mmacosx-version-min=10.4"
43
77
CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
45
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
46
-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \
47
-isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
79
-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
80
-I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \
81
-isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
49
83
# Intel linker flags
50
84
LFLAGS_X86="-arch i386 -mmacosx-version-min=10.4 \
51
-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1 \
52
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
85
-L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \
86
-Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
55
89
# Find the configure script