all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] OS X: make configure work better out of the box with FSF GCC
@ 2011-02-27  5:05 Daniel Colascione
  2011-02-28 19:56 ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Colascione @ 2011-02-27  5:05 UTC (permalink / raw)
  To: Emacs development discussions

[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]

I didn't include the corresponding configure changes; I figure I can let
whoever installs this patch regenerate the script.

== modified file 'configure.in'
--- configure.in	2011-02-27 04:33:43 +0000
+++ configure.in	2011-02-27 05:02:27 +0000
@@ -481,8 +481,21 @@
       * )            unported=yes ;;
     esac
     opsys=darwin
-    # Define CPP as follows to make autoconf work correctly.
-    CPP="${CC-cc} -E -no-cpp-precomp"
+	
+    # Define CPP as follows to make autoconf work correctly
+    # when using the system compiler.
+    case "$(which "${CC-cc}")" in
+      /usr/bin/* | /usr/lib/* )
+        CPP="${CC-cc} -E -no-cpp-precomp"
+        ;;
+      * )
+        # The below macro prevents the Carbon headers from defining
+        # nonstandard constructs not understood by FSF GCC.
+        CPPFLAGS="$CPPFLAGS -D__INTEL_COMPILER=1"
+        CPP="${CC-cc} -E -D__INTEL_COMPILER=1"
+        ;;
+    esac;
+
     # Use fink packages if available.
     if test -d /sw/include && test -d /sw/lib; then
       GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
@@ -614,9 +627,7 @@
     machine=intel386
     case "${canonical}" in
       *-cygwin )                opsys=cygwin ;;
-      *-darwin* )               opsys=darwin
-                                CPP="${CC-cc} -E -no-cpp-precomp"
- 				;;
+      *-darwin* )               opsys=darwin ;;
       *-linux-gnu* )		opsys=gnu-linux ;;
       *-sysv4.2uw* )	  	opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
       *-sysv5uw* )	  	opsys=unixware; NON_GNU_CPP=/lib/cpp ;;




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-28 22:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-27  5:05 [PATCH] OS X: make configure work better out of the box with FSF GCC Daniel Colascione
2011-02-28 19:56 ` Glenn Morris
2011-02-28 21:04   ` Daniel Colascione
2011-02-28 21:12     ` Andreas Schwab
2011-02-28 22:15     ` Chad Brown

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.