-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathautogen
executable file
·71 lines (61 loc) · 2.18 KB
/
autogen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /bin/sh
# -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
# vi: set tabstop=4 shiftwidth=4 expandtab: */
# ***** BEGIN LICENSE BLOCK *****
# Copyright (C) 2009 Zmanda Incorporated. All Rights Reserved.
#
# This file is part of libzcloud.
#
# libzcloud is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (the LGPL)
# as published by the Free Software Foundation, either version 2.1 of
# the LGPL, or (at your option) any later version.
#
# libzcloud is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# ***** END LICENSE BLOCK *****
# cd to the directory we're run from
cd `dirname $0`
# if you change this, please also change it in the root Makefile.am
includes="-I config -I config/macro-archive -I config/libzcloud"
# clean up
rm -f aclocal.m4
rm -rf autom4te*.cache
rm -f configure
echo "..listing documentation"
(
cd docs
echo 'rst_files ='
find . -name '*.rst' | sed -e 's!^./!rst_files += !'
) > docs/rst-files
echo "..listing plugins"
PLUGINS=$(cd plugins; ls -1)
(
echo "# Generated `date` by autogen"
for plugin in $PLUGINS; do
cfg="plugins/$plugin/configure.m4"
test -f $cfg && echo "m4_include($cfg)"
done
) > plugins/configure.m4
echo "..aclocal"
aclocal $includes || exit 1
echo "...aclocal patches"
# See http://bugzilla.gnome.org/show_bug.cgi?id=418778
#
# The Glib developers are a bit over-eager in their version requirements, requiring
# an unnecessarily high verison of pkg-config at configure time, when they really
# only need it at autogen time. This patch resets the version number in the file
# just generated by aclocal to the version we've been requiring all along.
sed -e \
's/PKG_PROG_PKG_CONFIG(\[0\.16\])/PKG_PROG_PKG_CONFIG([0.7])/g' \
< aclocal.m4 > aclocal.m4~
mv aclocal.m4~ aclocal.m4
echo "..autoconf"
autoconf || exit 1
echo "..autoheader"
autoheader || exit 1
touch config/config.h.in
echo "..automake"
automake --force --copy --warnings=none || exit 1