File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,17 @@ AC_LIB_PREFIX()
71
71
72
72
CPPFLAGS="-D_GNU_SOURCE ${CPPFLAGS}"
73
73
74
- # Mac OS X requires _DARWIN_C_SOURCE for valloc(3) to be visible
75
- case "${host_cpu}-${host_os}" in
76
- *-darwin*) CPPFLAGS="-D_DARWIN_C_SOURCE ${CPPFLAGS}";;
77
- esac
74
+ AM_CONDITIONAL([ IS_MACOS] , [ test "$host_os" = "darwin"] )
75
+
76
+ if test "$host_os" = "darwin"; then
77
+ # MacOS requires _DARWIN_C_SOURCE for valloc(3) to be visible
78
+ CPPFLAGS="-D_DARWIN_C_SOURCE ${CPPFLAGS}"
79
+ # LuaJIT also requires MACOSX_DEPLOYMENT_TARGET to be set on MacOS
80
+ if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
81
+ MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion)"
82
+ fi
83
+ AC_SUBST ( MACOSX_DEPLOYMENT_TARGET , $MACOSX_DEPLOYMENT_TARGET )
84
+ fi
78
85
79
86
# Build optimized or debug version ?
80
87
# First check for gcc and g++
Original file line number Diff line number Diff line change 16
16
17
17
EXTRA_DIST = luajit
18
18
19
+ if IS_MACOS
20
+ export MACOSX_DEPLOYMENT_TARGET := @MACOSX_DEPLOYMENT_TARGET@
21
+ endif
22
+
19
23
all-local : $(builddir ) /lib/libluajit-5.1.a
20
24
21
25
# LuaJIT does not support VPATH builds
You can’t perform that action at this time.
0 commit comments