[MLton-commit] r4840

Matthew Fluet fluet at mlton.org
Sun Nov 19 11:52:22 PST 2006


For *-darwin:
 - added include search path /opt/local/include 
 - added linker search path /opt/local/lib

This is where MacPorts (aka, DarwinPorts) installs Gnu MP.

This commit 'biases' the search paths in favor of MacPorts.


----------------------------------------------------------------------

U   mlton/trunk/bin/mlton-script
U   mlton/trunk/bytecode/Makefile
U   mlton/trunk/runtime/Makefile
U   mlton/trunk/runtime/platform.h

----------------------------------------------------------------------

Modified: mlton/trunk/bin/mlton-script
===================================================================
--- mlton/trunk/bin/mlton-script	2006-11-19 19:45:33 UTC (rev 4839)
+++ mlton/trunk/bin/mlton-script	2006-11-19 19:52:20 UTC (rev 4840)
@@ -62,8 +62,8 @@
 # about -m.  Someday, when we think we won't run into older gcc's,
 # these should be changed to -f.
 
-# You may need to add a line with -cc-opt 'I/path/to/gmp.h' so the
-# C compiler can find gmp.h
+# You may need to add a line with -cc-opt 'I/path/to/gmp.h' so 
+# that the C compiler can find gmp.h
 # You may need to add a line with -link-opt '-L/path/to/libgmp' so
 # that the linker can find libgmp.
 
@@ -79,7 +79,7 @@
         -target-cc-opt amd64                                    \
                 '-m32
                 -mtune=opteron'                                 \
-        -target-cc-opt darwin '-I/sw/include'                   \
+        -target-cc-opt darwin '-I/opt/local/include -I/sw/include' \
 	-target-cc-opt freebsd '-I/usr/local/include'		\
         -target-cc-opt solaris                                  \
                 '-Wa,-xarch=v8plusa
@@ -95,7 +95,7 @@
         -target-link-opt aix '-lgmp'                            \
         -target-link-opt amd64 '-m32'                           \
         -target-link-opt cygwin '-lgmp'                         \
-        -target-link-opt darwin "-L/sw/lib -lgmp"               \
+        -target-link-opt darwin '-L/opt/local/lib -L/sw/lib -lgmp' \
         -target-link-opt freebsd '-L/usr/local/lib/ -lgmp'      \
         -target-link-opt hpux '-lgmp'                           \
         -target-link-opt linux '-lgmp'                          \

Modified: mlton/trunk/bytecode/Makefile
===================================================================
--- mlton/trunk/bytecode/Makefile	2006-11-19 19:45:33 UTC (rev 4839)
+++ mlton/trunk/bytecode/Makefile	2006-11-19 19:52:20 UTC (rev 4840)
@@ -25,7 +25,7 @@
 endif
 
 ifeq ($(TARGET_OS), darwin)
-CFLAGS += -I/sw/include
+CFLAGS += -I/opt/local/include -I/sw/include
 endif
 
 ifeq ($(TARGET_OS), freebsd)

Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile	2006-11-19 19:45:33 UTC (rev 4839)
+++ mlton/trunk/runtime/Makefile	2006-11-19 19:52:20 UTC (rev 4840)
@@ -34,7 +34,7 @@
 endif
 
 ifeq ($(TARGET_OS), darwin)
-FLAGS += -I/sw/include
+FLAGS += -I/opt/local/include -I/sw/include
 endif
 
 ifeq ($(TARGET_OS), freebsd)

Modified: mlton/trunk/runtime/platform.h
===================================================================
--- mlton/trunk/runtime/platform.h	2006-11-19 19:45:33 UTC (rev 4839)
+++ mlton/trunk/runtime/platform.h	2006-11-19 19:52:20 UTC (rev 4840)
@@ -39,16 +39,17 @@
 /* C99-specific headers */
 #include <inttypes.h>
 
-/* On FreeBSD and OpenBSD the default gmp.h is installed in /usr/include, 
- * but that is version 2.  We want gmp version 4, which is installed in 
- * /usr/local/include, and is ensured to exist because it is required by the
- * MLton package.
- * On NetBSD, we want gmp to be installed into the pkg tree (which represents
- * the FreeBSD ports tree). For now we use the same method as in the FreeBSD
- * case, but we note that this should be changed so the makefile provides the
- * correct -I flags to the compiler.
- * On MacOS X, many users will use fink to install gmp, in which case gmp.h
- * will be installed in /sw/include.
+/* On FreeBSD and OpenBSD the default gmp.h is installed in
+ * /usr/include, but that is version 2.  We want gmp version 4, which
+ * is installed in /usr/local/include, and is ensured to exist because
+ * it is required by the MLton package.
+ * On NetBSD, we want gmp to be installed into the pkg tree (which
+ * represents the FreeBSD ports tree). For now we use the same method
+ * as in the FreeBSD case, but we note that this should be changed so
+ * the makefile provides the correct -I flags to the compiler.
+ * On MacOS X, many users will use macports or fink to install gmp, in
+ * which case gmp.h will be installed in /opt/local/include or
+ * /sw/include, respectively.
  */
 #include "gmp.h"
 




More information about the MLton-commit mailing list