Skip to content
This repository
Newer
Older
100755 94 lines (82 sloc) 2.772 kb
cd9dd26d » nslater
2008-06-15 made bootstrap portable to OpenSolaris
1 #!/bin/sh -e
544a38dd » cmlenz
2008-03-28 Imported trunk.
2
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
350811a3 » nslater
2009-07-14 wheeeeeeee
4 # use this file except in compliance with the License. You may obtain a copy of
544a38dd » cmlenz
2008-03-28 Imported trunk.
5 # the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
350811a3 » nslater
2009-07-14 wheeeeeeee
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
544a38dd » cmlenz
2008-03-28 Imported trunk.
12 # License for the specific language governing permissions and limitations under
13 # the License.
14
0e7a43f5 » nslater
2008-06-16 general shell script improvements
15 get () {
544a38dd » cmlenz
2008-03-28 Imported trunk.
16 variable_name=$1
7f3d76a0 » nslater
2008-12-20 more simplifications
17 echo "changequote(\`[', \`]')" > acinclude.m4.tmp
18 sed -e "s/m4_//" < acinclude.m4.in >> acinclude.m4.tmp
19 echo $variable_name >> acinclude.m4.tmp
bd7373b6 » nslater
2009-03-23 redirect errors to /dev/null
20 if test -x "`which gm4 2> /dev/null || true`"; then
7f3d76a0 » nslater
2008-12-20 more simplifications
21 gm4 acinclude.m4.tmp | grep -v "^$" || true
15b8d236 » nslater
2008-06-15 added check for gm4
22 else
bd7373b6 » nslater
2009-03-23 redirect errors to /dev/null
23 if test -x "`which m4 2> /dev/null || true`"; then
7f3d76a0 » nslater
2008-12-20 more simplifications
24 m4 acinclude.m4.tmp | grep -v "^$" || true
0e7a43f5 » nslater
2008-06-16 general shell script improvements
25 else
26 echo unknown
15b8d236 » nslater
2008-06-15 added check for gm4
27 fi
28 fi
7f3d76a0 » nslater
2008-12-20 more simplifications
29 rm -f acinclude.m4.tmp
30 }
31
fd587b8a » nslater
2009-03-31 removed build-aux, closed COUCHDB-309
32 mkdir -p build-aux
33
7f3d76a0 » nslater
2008-12-20 more simplifications
34 if test -z "$REVISION"; then
88cebc6d » janl
2009-09-12 use first 8 bytes of the commit hash as the release info when buildin…
35 if test -d .git; then
c091f9f1 » janl
2010-02-25 Do not rely on specific format of `git log`. Closes COUCHDB-670. Patc…
36 REVISION=`git log --pretty="format:%h" | head -1`-git
88cebc6d » janl
2009-09-12 use first 8 bytes of the commit hash as the release info when buildin…
37 else
38 # default to svn
39 REVISION=`\`which svn\` info . 2> /dev/null | awk "/Revision:/{print \\$2}"`
40 fi
7f3d76a0 » nslater
2008-12-20 more simplifications
41 fi
42 if test -z "`get LOCAL_VERSION_STAGE`" -o -z "$REVISION"; then
43 sed "s/%release%//" < acinclude.m4.in > acinclude.m4
44 else
45 sed "s/%release%/$REVISION/" < acinclude.m4.in > acinclude.m4
46 fi
47
112e286f » nslater
2008-12-20 cleanup
48 gunzip -c m4/ac_check_icu.m4.gz > m4/ac_check_icu.m4
49 gunzip -c m4/ac_check_curl.m4.gz > m4/ac_check_curl.m4
7f3d76a0 » nslater
2008-12-20 more simplifications
50
46d76555 » trondn
2011-08-09 Allow "versioned" names of the auto-tools to be used
51 # Seach a list of names for the first occurence of a program.
52 # Some systems may use aclocal-1.10, others may have aclocal etc.
53 #
54 # Exit with status code 0 if the program exists (and print the
55 # path to stdout), exit with status code 1 if it can't be
56 # located
57 find_program() {
58 set +e
59 for f in "$@"
60 do
61 file=`which ${f} 2>/dev/null | grep -v '^no '`
62 if test -n "x${file}" -a -x "${file}"
63 then
64 echo ${file}
65 set -e
66 exit 0
67 fi
68 done
69
70 echo "Failed to locate required program:" 1>&2
71 echo "\t$@" 1>&2
72 set -e
73 exit 1
74 }
75
76 LIBTOOLIZE=`find_program glibtoolize libtoolize`
77 ACLOCAL=`find_program aclocal-1.11 aclocal-1.10 aclocal-1.9 aclocal`
78 AUTOHEADER=`find_program autoheader`
79 AUTOMAKE=`find_program automake-1.11 automake-1.10 automake-1.9 automake`
80 AUTOCONF=`find_program autoconf`
112e286f » nslater
2008-12-20 cleanup
81
46d76555 » trondn
2011-08-09 Allow "versioned" names of the auto-tools to be used
82 ${LIBTOOLIZE} -f -c --automake
83 ${ACLOCAL} -I m4
84 ${AUTOHEADER} -f
85 ${AUTOMAKE} -f -a 2>&1 | sed -e "/install/d"
86 ${AUTOCONF} -f
7f3d76a0 » nslater
2008-12-20 more simplifications
87
3eb752a9 » nslater
2010-03-13 restore INSTALL file to dist
88 ln -f -s "`dirname \`readlink build-aux/missing\``/INSTALL"
89
7f3d76a0 » nslater
2008-12-20 more simplifications
90 cat << EOF
2bc4be3d » janl
2008-08-20 Merge runtimeconfig branch back into trunk
91 You have bootstrapped Apache CouchDB, time to relax.
544a38dd » cmlenz
2008-03-28 Imported trunk.
92
93 Run \`./configure' to configure the source before you install.
94 EOF
Something went wrong with that request. Please try again.