When AT_M4DIR is set with a package that has WANT_AUTOCONF=2.1, then eautoconf from autotools.eclass will supply an invalid argument for autotools-2.1 attempting to specify an include directory. This first regressed in http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?r1=1.101&r2=1.102 Reproducible: Always Steps to Reproduce: 1. Have a package with WANT_AUTOCONF=2.1 2. Be compiling where AT_M4DIR or AT_SYS_M4DIR is set (eg: cross-compiling?) 3. Attempt to use eautoconf in an ebuild Actual Results: The call to autoconf will eventually fail, because it will be passed a -I argument. While this is valid for autoconf-2.6*, this flag is not recognized in autoconf-2.13 (the current sys-devel/autoconf stable for 2.1*) Expected Results: It is not passed a -I argument and succeeds This was discovered while attempting to cross-compile ChromiumOS using (unmodified) dev-libs/nspr-4.9.2, having =sys-devel/autoconf-2.13 and having =sys-devel/autoconf-wrapper-12 - but I believe this problem is demonstrable independent of that (although I don't know enough of Gentoo's build system to prove that)
AT_M4DIR is only for ebuilds. if you're setting that in your make.conf, you're doing something wrong. if an ebuild is setting that and WANT_AUTOCONF=2.1, then they're doing something wrong. as for AT_SYS_M4DIR, that is probably something we should fix since that is profile level stuff.
should be fixed in the tree now http://sources.gentoo.org/eclass/autotools.eclass?r1=1.150&r2=1.151