The configure script of vim[-core]-7.0_beta has a broken regex that will detect gcc's major version as 2 or lower if $CC contains a numeral, e.g. CC=gcc will work, but CC=i686-pc-linux-gnu-gcc won't. The build will then omit some header magic I don't understand and maybe do something else, but still compile. The problem lies with line 5 of the following configure snippet: echo "$as_me:$LINENO: checking for GCC 3 or later" >&5 echo $ECHO_N "checking for GCC 3 or later... $ECHO_C" >&6 DEPEND_CFLAGS_FILTER= if test "$GCC" = yes; then gccmajor=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\(darwin.[^0-9]*\)*\([1-9]\ )\.[0-9].*$/\2/g'` if test "$gccmajor" -gt "2"; then DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" fi fi if test "$DEPEND_CFLAGS_FILTER" = ""; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 fi To have configure use the gcc-major-version as reported by portage, I added this ugly mother before econf in my vim.eclass: sed 's#`"$CC" --version | sed -e '\''2,$d\;s/^\[^0-9\]\*\\(darwin.\[^0-9\]\*\\)\*\\(\[1-9\]\\)\\\.\[0-9\]\.\*\$/\\2/g'\'\`#$(gcc-major-version)# -i src/auto/configure I wonder if that is a general autoconf bug?
Sorry, got a line break in there. In the code snippet, everything from gccmajor= to the last backtick goes into one line.
Sorry, line breaks in the ugly hotfix as well. Aw shoot.
What's the relevant autoconf check?
I'm not sure what you mean... "checking for GCC 3 or later"? Btw, I think now that this is just a vim problem and not a general autoconf bug. In configure.in, they seem to have added the following section: dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to dnl use "-isystem" instead of "-I" for all non-Vim include dirs. dnl But only when making dependencies, cproto and lint don't take "-isystem". dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow dnl the number before the version number. AC_MSG_CHECKING(for GCC 3 or later) DEPEND_CFLAGS_FILTER= if test "$GCC" = yes; then gccmajor=`"$CC" --version | sed -e '2,$d;s/^[[^0-9]]*\(darwin.[[^0-9]]*\)*\([[ 1-9]]\)\.[[0-9]].*$/\2/g'` if test "$gccmajor" -gt "2"; then DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'" fi fi if test "$DEPEND_CFLAGS_FILTER" = ""; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) fi AC_SUBST(DEPEND_CFLAGS_FILTER)
Fixed upstream in vim 7 final