[PATCH] Change autogen.sh scripts to respect NOCONFIGURE

Gaetan Nadon memsize at videotron.ca
Thu Jun 14 13:02:20 PDT 2012

On 12-06-14 11:17 AM, Colin Walters wrote:
> On Sat, 2012-06-09 at 17:26 -0400, Gaetan Nadon wrote:
>> I'd rather have a script change only and drop the "install through
>> util-macros" part. This will reduce the overall complexity and reduce
>> the number of places to investigate when things go wrong. Changes to
>> the script are likely to be several years apart. 
> Makes sense.
>> A note about http://cgit.freedesktop.org/xorg/test/xorg-gtest/. This
>> module has a different script (the only one so far) which never
>> runs ./configure. Chase Douglas is actively maintaining this module.
>> The new script you are proposing might just well be what he was
>> waiting for.
> Yes, that autogen.sh is fine.  The build API doesn't care whether or not
> autogen.sh runs configure by default or not, merely that there is a
> standard way to ensure it doesn't.
>> Overall there are about 240 modules that are being published at
>> different intervals. The list can be obtained by running
>> modular/build.sh -L.
>> If you post the revised patch, I'll be happy to review it. 
> Looks like this is the diff of the autogen.sh from xorg-test as applied
> to xorg-xserver:
> diff --git a/autogen.sh b/autogen.sh
> index 4e8b11b..a08311b 100755
> --- a/autogen.sh
> +++ b/autogen.sh
> @@ -6,7 +6,6 @@ test -z "$srcdir" && srcdir=.
>  ORIGDIR=`pwd`
>  cd $srcdir
> -autoreconf --force -v --install || exit 1
> +autoreconf -v --install || exit 1
>  cd $ORIGDIR || exit $?
> -$srcdir/configure --enable-maintainer-mode "$@"
> So if we're going with the "use xorg-gtest autogen.sh" approach, the
> main question is: Use --force or not?  It doesn't matter to me because
> my build system builds ONLY from git, and X.org modules don't include
> pregenerated configure scripts in git (because you're sane). 
That was one additional change I intended to make in the xorg modules,
that is, using --force. Currently only the xserver and gtest uses it.
The reason I wanted to switch all modules to use --force is in the case
where the source is built with different versions of autotools. Of
course it does not happen often, but it's quite a pain to investigate.
> However, someone may want to rerun auto* from a Linux distribution
> "package" where they build from tarballs (because they're stuck in the
> 1990s), and it would help them if --force was used.
Note that autogen.sh is not shipped in tarballs except in some modules
where a controversy exists. I noticed the jhbuild system and the
modular/build.sh looks at the presence of this file to make some
decisions. I did as much reading as I could on the topic, I found that
autogen.sh is a "legacy" script prior to the introduction of autoreconf
as there were too many commands to type. It's not part of the GNU build
system and isn't included in any GNU tarballs.

There are two main reasons why we have identical scripts in all (but a
couple) modules. It would be very disruptive to the developers if there
were several behaviours to cope with. One would have to make a mental
note which modules behave differently. Writing and applying patches is a
lot easier.

It looks like the original patch at the top of the thread is still
valid. It allows you to avoid any xorg internal issues as it only adds a
test around the configure call. I could not get it to apply, however.
Perhaps it is the attachment or something. Maybe using git send-email
will help. Because of the --force difference, you'll need of path for
the xserver (which can only be applied by Keith) and one for the rest of
the modules. FYI I'll be away for a week tomorrow.


More information about the xorg-devel mailing list