Ticket #52281: autogen.sh

File autogen.sh, 949 bytes (added by gwhitney, 8 years ago)

upstream autogen.sh from the source repository, not included in release tarball

Line 
1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3
4srcdir=`dirname $0`
5test -z "$srcdir" && srcdir=.
6
7(test -f $srcdir/configure.ac \
8  && test -f $srcdir/ChangeLog \
9  && test -d $srcdir/shell) || {
10    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
11    echo " top-level evolution directory"
12    exit 1
13}
14
15olddir=`pwd`
16cd $srcdir
17
18check_exists() {
19        variable=`which $1`
20
21        if test -z $variable; then
22                echo "*** No $1 found, please intall it ***" >&2
23                exit 1
24        fi
25}
26
27check_exists aclocal
28check_exists autoreconf
29check_exists gtkdocize
30check_exists intltoolize
31
32m4dir=`autoconf --trace 'AC_CONFIG_MACRO_DIR:$1'`
33if [ -n "$m4dir" ]; then
34        mkdir -p $m4dir
35fi
36
37aclocal -I m4 || exit $?
38gtkdocize --copy || exit $?
39intltoolize --force --copy --automake || exit $?
40autoreconf --verbose --force --install -Wno-portability || exit $?
41
42cd $olddir
43test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-maintainer-mode "$@"