From ca313defe4658d16c003871ef63784fe0b7d1d49 Mon Sep 17 00:00:00 2001 From: Robert Shaw Date: Tue, 16 Mar 2010 13:08:32 -0700 Subject: Add GCC 4.0 info to --config output. * Adds GCC 4.0 version info to --config output. * Splits gcc_build into gcc_40_build and gcc_42_build. * Adds alias gcc_build to gcc_42_build for compatibility. * Updates Xcode checking to also check GCC 4.0 version. These changes are a combination of work by AdamV and my work on my Tiger branch. This information would be useful for all installs since some formulae compile with GCC 4.0. Signed-off-by: Adam Vandenberg --- Library/Homebrew/brew.h.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 6ca3fc157..92a682d72 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -494,7 +494,7 @@ private end end -def gcc_build +def gcc_42_build `/usr/bin/gcc-4.2 -v 2>&1` =~ /build (\d{4,})/ if $1 $1.to_i @@ -508,6 +508,16 @@ def gcc_build nil end end +alias :gcc_build :gcc_42_build # For compatibility + +def gcc_40_build + `/usr/bin/gcc-4.0 -v 2>&1` =~ /build (\d{4,})/ + if $1 + $1.to_i + else + nil + end +end def llvm_build if MACOS_VERSION >= 10.6 -- cgit v1.2.3