All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Autotool improvements.
@ 2009-10-08 16:51 Pekka Pessi
  2009-10-09  8:36 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
  0 siblings, 1 reply; 4+ messages in thread
From: Pekka Pessi @ 2009-10-08 16:51 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2128 bytes --]

From: Pekka Pessi <Pekka.Pessi@nokia.com>

Bootstrap script now tries to use explicitly versioned automake, which makes
life easier with scratchbox and friends. Bootstrap also uses autoreconf
instead of explictly running various autotools.
---
 Makefile.am  |    2 ++
 bootstrap    |   38 +++++++++++++++++++++++++++++++++-----
 configure.ac |    3 ++-
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cf84bf7..9ade516 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,8 @@
 
 AM_MAKEFLAGS = --no-print-directory
 
+ACLOCAL_AMFLAGS = -I m4
+
 includedir = @includedir@/ofono
 
 include_HEADERS = include/log.h include/plugin.h include/history.h \
diff --git a/bootstrap b/bootstrap
index 053f5c8..c751b3c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,35 @@
 #!/bin/sh
 
-aclocal && \
-    autoheader && \
-        libtoolize --automake --copy --force &&
-	    automake --add-missing --copy && \
-		autoconf
+if test -z "$AUTOMAKE"
+then
+    for version in 1.10 1.11 1.12
+    do 
+	if which automake-$version > /dev/null
+	then
+	    AUTOMAKE=automake-$version ACLOCAL=aclocal-$version
+	    export AUTOMAKE ACLOCAL
+	    break
+	fi
+   done
+fi
+
+if test -z "$AUTOMAKE"
+then
+    for version in 1.10 1.11 1.12
+    do 
+	if automake --version | head -1 | fgrep -q $version
+	then
+	    AUTOMAKE=automake ACLOCAL=aclocal
+	    export AUTOMAKE ACLOCAL
+	fi
+    done
+fi
+
+# Remove libtool files (in case they conflict with older libtool)
+rm -f m4/libtool.m4 \
+      m4/lt~obsolete.m4 \
+      m4/ltoptions.m4 \
+      m4/ltsugar.m4 \
+      m4/ltversion.m4
+
+autoreconf --install --force "$@"
diff --git a/configure.ac b/configure.ac
index 4cc4449..55fd281 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,9 @@
 AC_PREREQ(2.60)
 AC_INIT(ofono, 0.7)
 
-AM_INIT_AUTOMAKE([foreign subdir-objects])
+AM_INIT_AUTOMAKE([foreign subdir-objects 1.10])
 AM_CONFIG_HEADER(config.h)
+AC_CONFIG_MACRO_DIR([m4])
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-09  9:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08 16:51 [PATCH] Autotool improvements Pekka Pessi
2009-10-09  8:36 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2009-10-09  9:02   ` Marcel Holtmann
2009-10-09  9:10     ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.