Merge lp://staging/~trond-norbye/libmemcached/bug_395094 into lp://staging/~tangent-org/libmemcached/trunk

Proposed by Trond Norbye
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~trond-norbye/libmemcached/bug_395094
Merge into: lp://staging/~tangent-org/libmemcached/trunk
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~trond-norbye/libmemcached/bug_395094
Reviewer Review Type Date Requested Status
Monty Taylor Pending
Libmemcached-developers Pending
Review via email: mp+8178@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Trond Norbye (trond-norbye) wrote :

Rewrote the autogen.sh script to no longer require bash (plain Bourne shell syntax should be sufficient). I also "re-wrote the detection for all of the binaries to use a common function to avoid the duplication of the "search-logic".

The last change was to include the version numbers from _all_ of the tools, and not only two of them...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config/autorun.sh'
--- config/autorun.sh 2009-06-15 00:42:52 +0000
+++ config/autorun.sh 2009-07-03 10:48:15 +0000
@@ -1,112 +1,88 @@
1#!/usr/bin/env bash1#!/bin/sh
2# Taken from lighthttpd server (BSD). Thanks Jan!2# Taken from lighthttpd server (BSD). Thanks Jan!
3# Run this to generate all the initial makefiles, etc.3# Run this to generate all the initial makefiles, etc.
44
5die() { echo "$@"; exit 1; }5die() { echo "$@"; exit 1; }
66
7# LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}7# --force means overwrite ltmain.sh script if it already exists
8LIBTOOLIZE_FLAGS=" --automake --copy --force"8LIBTOOLIZE_FLAGS=" --automake --copy --force"
9# ACLOCAL=${ACLOCAL:-aclocal}9# --add-missing instructs automake to install missing auxiliary files
10# and --force to overwrite them if they already exist
11AUTOMAKE_FLAGS="--add-missing --copy --force"
10ACLOCAL_FLAGS="-I m4"12ACLOCAL_FLAGS="-I m4"
11# AUTOHEADER=${AUTOHEADER:-autoheader}
12# AUTOMAKE=${AUTOMAKE:-automake}
13AUTOMAKE_FLAGS="--add-missing --copy --force"
14# AUTOCONF=${AUTOCONF:-autoconf}
1513
16ARGV0=$014ARGV0=$0
17ARGS="$@"15ARGS="$@"
1816
19
20run() {17run() {
21 echo "$ARGV0: running \`$@' $ARGS"18 echo "$ARGV0: running \`$@' $ARGS"
22 $@ $ARGS19 $@ $ARGS
23}20}
2421
25## jump out if one of the programs returns 'false'22# Try to locate a program by using which, and verify that the file is an
26set -e23# executable
2724locate_binary() {
28## We do not currently support glibtoolize25 for f in $@
26 do
27 file=`which $f 2>/dev/null | grep -v '^no '`
28 if test -n "$file" -a -x "$file"; then
29 echo $file
30 return 0
31 fi
32 done
33
34 echo ""
35 return 1
36}
37
38# Try to detect the supported binaries if the user didn't
39# override that by pushing the environment variable
29if test x$LIBTOOLIZE = x; then40if test x$LIBTOOLIZE = x; then
30 if test \! "x`which glibtoolize 2> /dev/null | grep -v '^no'`" = x; then41 LIBTOOLIZE=`locate_binary glibtoolize libtoolize-1.5 libtoolize`
31 LIBTOOLIZE=glibtoolize42 if test x$LIBTOOLIZE = x; then
32 elif test \! "x`which libtoolize-1.5 2> /dev/null | grep -v '^no'`" = x; then43 die "Did not find a supported libtoolize"
33 LIBTOOLIZE=libtoolize-1.5
34 elif test \! "x`which libtoolize 2> /dev/null | grep -v '^no'`" = x; then
35 LIBTOOLIZE=libtoolize
36 else
37 echo "libtoolize 1.5.x wasn't found, exiting"; exit 0
38 fi44 fi
39fi45fi
4046
41## suse has aclocal and aclocal-1.9
42if test x$ACLOCAL = x; then47if test x$ACLOCAL = x; then
43 if test \! "x`which aclocal-1.10 2> /dev/null | grep -v '^no'`" = x; then48 ACLOCAL=`locate_binary aclocal-1.10 aclocal-1.9 aclocal19 aclocal`
44 ACLOCAL=aclocal-1.1049 if test x$ACLOCAL = x; then
45 elif test \! "x`which aclocal-1.9 2> /dev/null | grep -v '^no'`" = x; then50 die "Did not find a supported aclocal"
46 ACLOCAL=aclocal-1.9
47 elif test \! "x`which aclocal19 2> /dev/null | grep -v '^no'`" = x; then
48 ACLOCAL=aclocal19
49 elif test \! "x`which aclocal 2> /dev/null | grep -v '^no'`" = x; then
50 ACLOCAL=aclocal
51 else
52 echo "automake 1.9.x (aclocal) wasn't found, exiting"; exit 0
53 fi51 fi
54fi52fi
5553
56if test x$AUTOMAKE = x; then54if test x$AUTOMAKE = x; then
57 if test \! "x`which automake-1.10 2> /dev/null | grep -v '^no'`" = x; then55 AUTOMAKE=`locate_binary automake-1.10 automake-1.9 automake19 automake`
58 AUTOMAKE=automake-1.1056 if test x$AUTOMAKE = x; then
59 elif test \! "x`which automake-1.9 2> /dev/null | grep -v '^no'`" = x; then57 die "Did not find a supported automake"
60 AUTOMAKE=automake-1.9
61 elif test \! "x`which automake19 2> /dev/null | grep -v '^no'`" = x; then
62 AUTOMAKE=automake19
63 elif test \! "x`which automake 2> /dev/null | grep -v '^no'`" = x; then
64 AUTOMAKE=automake
65 else
66 echo "automake 1.9.x wasn't found, exiting"; exit 0
67 fi58 fi
68fi59fi
6960
70
71## macosx has autoconf-2.59 and autoconf-2.60
72if test x$AUTOCONF = x; then61if test x$AUTOCONF = x; then
73 if test \! "x`which autoconf-2.59 2> /dev/null | grep -v '^no'`" = x; then62 AUTOCONF=`locate_binary autoconf-2.59 autoconf259 autoconf`
74 AUTOCONF=autoconf-2.5963 if test x$AUTOCONF = x; then
75 elif test \! "x`which autoconf259 2> /dev/null | grep -v '^no'`" = x; then64 die "Did not find a supported autoconf"
76 AUTOCONF=autoconf259
77 elif test \! "x`which autoconf 2> /dev/null | grep -v '^no'`" = x; then
78 AUTOCONF=autoconf
79 else
80 echo "autoconf 2.59+ wasn't found, exiting"; exit 0
81 fi65 fi
82fi66fi
8367
84if test x$AUTOHEADER = x; then68if test x$AUTOHEADER = x; then
85 if test \! "x`which autoheader-2.59 2> /dev/null | grep -v '^no'`" = x; then69 AUTOHEADER=`locate_binary autoheader-2.59 autoheader259 autoheader`
86 AUTOHEADER=autoheader-2.5970 if test x$AUTOHEADER = x; then
87 elif test \! "x`which autoheader259 2> /dev/null | grep -v '^no'`" = x; then71 die "Did not find a supported autoheader"
88 AUTOHEADER=autoheader259
89 elif test \! "x`which autoheader 2> /dev/null | grep -v '^no'`" = x; then
90 AUTOHEADER=autoheader
91 else
92 echo "autoconf 2.59+ (autoheader) wasn't found, exiting"; exit 0
93 fi72 fi
94fi73fi
9574
96
97# --force means overwrite ltmain.sh script if it already exists
98run $LIBTOOLIZE $LIBTOOLIZE_FLAGS || die "Can't execute libtoolize"75run $LIBTOOLIZE $LIBTOOLIZE_FLAGS || die "Can't execute libtoolize"
99
100run $ACLOCAL $ACLOCAL_FLAGS || die "Can't execute aclocal"76run $ACLOCAL $ACLOCAL_FLAGS || die "Can't execute aclocal"
101run $AUTOHEADER || die "Can't execute autoheader"77run $AUTOHEADER || die "Can't execute autoheader"
102
103# --add-missing instructs automake to install missing auxiliary files
104# and --force to overwrite them if they already exist
105run $AUTOMAKE $AUTOMAKE_FLAGS || die "Can't execute automake"78run $AUTOMAKE $AUTOMAKE_FLAGS || die "Can't execute automake"
106run $AUTOCONF || die "Can't execute autoconf"79run $AUTOCONF || die "Can't execute autoconf"
10780
108echo -n "Automade with: "81echo "---"
109$AUTOMAKE --version | head -182echo "Configured with the following tools:"
110echo -n "Configured with: "83echo " * `$LIBTOOLIZE --version | head -1`"
111$AUTOCONF --version | head -184echo " * `$ACLOCAL --version | head -1`"
11285echo " * `$AUTOHEADER --version | head -1`"
86echo " * `$AUTOMAKE --version | head -1`"
87echo " * `$AUTOCONF --version | head -1`"
88echo "---"

Subscribers

People subscribed via source and target branches

to all changes: