~ chicken-core (chicken-5) c6a6a26225620b566f8bc487cc4180de55555a2a


commit c6a6a26225620b566f8bc487cc4180de55555a2a
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Jan 28 10:16:09 2014 +0100
Commit:     Jim Ursetto <zbigniewsz@gmail.com>
CommitDate: Sat Feb 1 19:14:18 2014 -0600

    Use additional variables in MacOSX makefile to specify location of C compiler and build tools. Setting -isysroot doesn't seem to be necessary in this case, the default being to compile for Mac OS, apparently.

diff --git a/Makefile.macosx b/Makefile.macosx
index 39f395a0..fea3ef99 100644
--- a/Makefile.macosx
+++ b/Makefile.macosx
@@ -33,11 +33,14 @@ SRCDIR = ./
 
 # platform configuration
 
+XCODE_DEVELOPER ?= /Applications/Xcode.app/Contents/Developer
+XCODE_TOOL_PATH ?= $(XCODE_DEVELOPER)/Toolchains/XcodeDefault.xctoolchain/usr/bin
+C_COMPILER ?= $(XCODE_DEVELOPER)/usr/bin/gcc
 ARCH ?= $(shell sh $(SRCDIR)/config-arch.sh)
 
 # commands
 
-POSTINSTALL_PROGRAM = install_name_tool
+POSTINSTALL_PROGRAM = $(XCODE_TOOL_PATH)/install_name_tool
 
 # options
 
@@ -51,6 +54,7 @@ else
 C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
 endif
 endif
+LIBRARIAN ?= $(XCODE_TOOL_PATH)/ar
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -dynamiclib -compatibility_version 1 -current_version 1.0 -install_name $@
 POSTINSTALL_PROGRAM_FLAGS = -change lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(SO) $(LIBDIR)/lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(SO)
 LIBRARIAN_OPTIONS = scru
diff --git a/README b/README
index a063af3f..ff4c29f3 100644
--- a/README
+++ b/README
@@ -442,7 +442,16 @@
 
 	Mac OS X:
 
-	  - On 10.6 and 10.7, Chicken may incorrectly select a 32-bit build
+          - The build currently assumes the Xcode application path is
+            "/Applications/Xcode.app/", with the C compiler and build
+            tools being located in the "Contents/Developer/usr/bin"
+            and
+            "Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"
+            subdirectories, respectively. To override these locations,
+            set XCODE_DEVELOPER and XCODE_TOOL_PATH on the make(3)
+            command line.
+
+	  - On 10.6 and 10.7, CHICKEN may incorrectly select a 32-bit build
 	    environment when it should be building 64-bit, resulting in a
 	    build error.  This occurs when you have a 32-bit kernel and a
 	    64-bit gcc (that is, on Core 2 Duo systems running 10.6 Desktop).
Trap