Bug 750574 - Only use "fixed" egrep command on OS X 10.7 [r=ted] Bug 775405 - Fix build for OS X v10.7 when non-universal egrep is on $PATH before Apple's egrep. r=ted --- mozilla-release.orig/configure 2011-11-20 15:01:32.000000000 -0500 +++ mozilla-release/configure 2015-09-22 11:44:18.000000000 -0400 @@ -25777,14 +25777,16 @@ -# Hack around an Apple bug that effects the egrep that comes with OS X 10.7. -# "arch -arch i386 egrep" always uses the 32-bit Intel part of the egrep fat -# binary, even on 64-bit systems. It should work on OS X 10.4.5 and up. We -# (apparently) only need this hack when egrep's "pattern" is particularly -# long (as in the following code). See bug 655339. +# Hack around an Apple bug that affects the egrep that comes with OS X 10.7. +# "env ARCHPREFERENCE=i386,x86_64 arch egrep" first tries to use the 32-bit +# Intel part of the egrep fat binary, even on 64-bit systems, and falls back on +# the 64-bit part if it's not a fat binary, as can happen with Fink. We +# (apparently) only need this hack when egrep's "pattern" is particularly long +# (as in the following code) and the first egrep on our $PATH is Apple's. See +# bug 655339. case "$host" in -*-apple-darwin*) - FIXED_EGREP="arch -arch i386 egrep" +*-apple-darwin11*) + FIXED_EGREP="env ARCHPREFERENCE=i386,x86_64 arch egrep" ;; *) FIXED_EGREP="egrep"