Some users will emerge multiple versions of autoconf without cleaning up previous versions (for example, have 2.57a and 2.58 installed simultaneously). The problem with this is that /usr/bin/autoconf-2.xx calls /usr/bin/autom4te, which should call the appropriate version, but this scenario could happen: /usr/bin/autoconf-2.57a gets called, which in turn called /usr/bin/autom4te (from the AUTOM4TE variable), which determines that /usr/bin/autom4te-2.58 needs to be called. This causes a versioning conflict. Instead, we should add a line in /usr/bin/autoconf which sets the AUTOM4TE environment variable to set the appropriate autom4te version when using autoconf. That is, in /usr/bin/autoconf-2.58, set AUTOM4TE='/usr/bin/autom4te-2.58' That way, the proper autom4te gets called from autoconf. Reproducible: Always Steps to Reproduce: emerge two simultaneous versions of autoconf without cleaning the older one out. This is reasonable, so that software designers can test their auto scripts on multiple versions. Actual Results: programs calling autoconf specific versions fail because autom4te may run a different conflicting version.
Proposed patch: Index: ac-wrapper-2.pl =================================================================== RCS file: /home/cvsroot/gentoo-x86/sys-devel/autoconf/files/ac-wrapper-2.pl,v retrieving revision 1.1 diff -u -3 -p -r1.1 ac-wrapper-2.pl --- ac-wrapper-2.pl 7 Nov 2003 23:47:20 -0000 1.1 +++ ac-wrapper-2.pl 9 Feb 2004 18:08:30 -0000 @@ -67,6 +67,11 @@ if ($ENV{WANT_AUTOCONF} ne '2.1') { $ENV{WANT_ACWRAPPER_DEBUG} and print STDERR "ac-wrapper: will execute <$binary>\n"; +if($ENV{AUTOM4TE} eq "") { + $ENV{AUTOM4TE} = $binary; + $ENV{AUTOM4TE} =~ s/autoconf/autom4te/; +} + exec $binary, @ARGV; die "ac-wrapper: ouch, couldn't call binary ($binary).\n";
Done. Small tweak though: -- Index: files/ac-wrapper-2.pl =================================================================== RCS file: /home/cvsroot/gentoo-x86/sys-devel/autoconf/files/ac-wrapper-2.pl,v retrieving revision 1.2 diff -u -r1.2 ac-wrapper-2.pl --- files/ac-wrapper-2.pl 15 Feb 2004 09:07:07 -0000 1.2 +++ files/ac-wrapper-2.pl 15 Feb 2004 21:12:36 -0000 @@ -65,6 +65,11 @@ } } +if(($ENV{AUTOM4TE} eq "") && ($binary ne "$0-2.13")) { + $ENV{AUTOM4TE} = $binary; + $ENV{AUTOM4TE} =~ s/autoconf/autom4te/; +} + $ENV{WANT_ACWRAPPER_DEBUG} and print STDERR "ac-wrapper: will execute <$binary>\n"; exec $binary, @ARGV;