[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] OS X: make configure work better out of the box with FSF GCC
From: |
Daniel Colascione |
Subject: |
[PATCH] OS X: make configure work better out of the box with FSF GCC |
Date: |
Sat, 26 Feb 2011 21:05:50 -0800 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
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 ;;
signature.asc
Description: OpenPGP digital signature
- [PATCH] OS X: make configure work better out of the box with FSF GCC,
Daniel Colascione <=