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()
7171
7272CPPFLAGS="-D_GNU_SOURCE ${CPPFLAGS}"
7373
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
7885
7986# Build optimized or debug version ?
8087# First check for gcc and g++
Original file line number Diff line number Diff line change 1616
1717EXTRA_DIST = luajit
1818
19+ if IS_MACOS
20+ export MACOSX_DEPLOYMENT_TARGET := @MACOSX_DEPLOYMENT_TARGET@
21+ endif
22+
1923all-local : $(builddir ) /lib/libluajit-5.1.a
2024
2125# LuaJIT does not support VPATH builds
You can’t perform that action at this time.
0 commit comments