[PATCH] Clean up autogen.sh script

199 views
Skip to first unread message

Jeff Bailey

unread,
Sep 30, 2008, 2:40:04 PM9/30/08
to Protocol Buffers
The autogen.sh script has all sorts of hardcoded magic in it,
including the version of the autotools, and the fact that we're
requiring "foriegn" mode. With this patch, this will attempt to use
whatever the system autotools is, and also makes the foreign mode
explicit.

diff --git a/Makefile.am b/Makefile.am
index cd90b6c..52f2caf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,8 @@

ACLOCAL_AMFLAGS = -I m4

+AUTOMAKE_OPTIONS = foreign
+
SUBDIRS = src

EXTRA_DIST
= \
diff --git a/autogen.sh b/autogen.sh
index 34a4d2e..959279b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -15,13 +15,7 @@ fi

set -ex

-rm -rf autom4te.cache
-
-aclocal-1.9 --force -I m4
-libtoolize -c -f
-autoheader -f -W all
-automake-1.9 --foreign -a -c -f -W all
-autoconf -f -W all,no-obsolete
+autoreconf -Wall -f -i

rm -rf autom4te.cache config.h.in~
exit 0

Kenton Varda

unread,
Sep 30, 2008, 2:52:09 PM9/30/08
to Jeff Bailey, Protocol Buffers
The reason I specified automake-1.9 explicitly is because our corp workstations actually have the regular "automake" command linked to automake-1.4, which is not good enough.  automake-1.9 is installed on our workstations, but is not the default.  Can we somehow auto-detect this situation and do something about it?

Kenton Varda

unread,
Sep 30, 2008, 4:56:51 PM9/30/08
to Jeff Bailey, Protocol Buffers
After some offline discussion I've gone ahead and submitted this.

On Tue, Sep 30, 2008 at 11:40 AM, Jeff Bailey <jeffb...@google.com> wrote:

Jeff Bailey

unread,
Sep 30, 2008, 5:51:05 PM9/30/08
to Protocol Buffers
Heya Kenton,

I played with the warning option a touch more, and if we do:

autoreconf -f -i -Wall,no-obsolete

it seems to give it without all the noise from old constructs in the
libtool and automake M4 macros. Checked with automake-1.9/
autoconf2.59 and automake1.10/autoconf2.61

On Sep 30, 1:56 pm, "Kenton Varda" <ken...@google.com> wrote:
> After some offline discussion I've gone ahead and submitted this.
>

Kenton Varda

unread,
Sep 30, 2008, 6:02:11 PM9/30/08
to Jeff Bailey, Protocol Buffers
Done.
Reply all
Reply to author
Forward
0 new messages