Basically what the summary says. Some packages have several AC_PRERQ macro calls in aclocal.m4 where the first only requires 2.1 but another requires 2.5 See attached patch about how to fix this.. it just gets all calls and takes the (stringwise) largest number Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 25486 [details, diff] fix to evalutate all AC_PRERQ macro calls
The test was actually wrong (did not catch '(?.??)' ..) . Please try autoconf-2.59-r1, or provide a test package which it fails for, so that I can have a look.
nopes, still doesn't work. the new ac-wrapper-2.pl still doesn't evaluate all AC_PREREQ calls. for example net-irc/irssi-cvs has to select the autotools versions explicitly because of this.
Works fine here: -- nosferatu irssi # grep AC_PRE * aclocal.m4:[AC_PREREQ([2.12]) aclocal.m4:[AC_PREREQ(2.50)dnl configure:# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. configure:# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. configure:# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. configure:# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. nosferatu irssi # set | grep AUTO nosferatu irssi # ./autogen.sh Creating help files... Documentation: html -> txt... Checking auto* tools... **Warning**: I am going to run `configure' with no arguments. If you wish to pass any to it, please specify them on the `./autogen.sh' command line. Running libtoolize... You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'. Running aclocal -I . ... Running autoheader... autoheader-2.59: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' autoheader-2.59: WARNING: and `config.h.top', to define templates for `config.h.in' autoheader-2.59: WARNING: is deprecated and discouraged. autoheader-2.59: autoheader-2.59: WARNING: Using the third argument of `AC_DEFINE' and autoheader-2.59: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without autoheader-2.59: WARNING: `acconfig.h': autoheader-2.59: autoheader-2.59: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1, autoheader-2.59: [Define if a function `main' is needed.]) autoheader-2.59: autoheader-2.59: WARNING: More sophisticated templates can also be produced, see the autoheader-2.59: WARNING: documentation. configure.in:18: warning: AC_ARG_PROGRAM invoked multiple times Running autoconf ... configure.in:18: warning: AC_ARG_PROGRAM invoked multiple times Running automake --gnu ... Running ./configure --enable-maintainer-mode --enable-compile-warnings ... checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets $(MAKE)... yes checking for working aclocal-1.4... found checking for working autoconf... found
hum, indeed. irssi works again... just upgraded to -r3 let me give you a shorter example: $ cat > configure.in <<EOF AC_INIT(configure.in) AC_PREREQ([2.1]); AC_PREREQ([2.5]); EOF $ autoconf $ ./configure --version configure generated by autoconf version 2.13
Created attachment 26671 [details] ac-wrapper.pl Ok, I wanted to rather add it via function. I however suck at perl, so cannot see why it does not work properly :/ Any ideas?
It should read something like sub ac_version { return ((@versions = cat_(shift) =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3}[0-9]?)[^\)]*\]?\)/mg) ? ((sort @versions)[-1]) : ''); } you got the assignment wrong. It's not @versions = cat_(shift) but @versions = (cat_(shift) =~ ... ) The match operator returns an array ($1, $2, $3, $4, ...) which is assigned to @versions. alternativly you could write something like my $file = cat_(shift); return ((@versions = $file =~ ...
I did try adding the cut_() inbetween. It seems rather its the return that causes issues for some reasons. Maybe because of the '.' in what is returned?
Created attachment 27157 [details] ac-wrapper with my fix sorry for the long delay. I modified the ac-wrapper as I described above, and it works for me. could you please provide a short counter-example were it doesn't?
I've committed this to ac-wrapper-4 which is used in autoconf-2.59-r4.