File: autogen.sh

package info (click to toggle)
chafa 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,032 kB
  • sloc: ansic: 14,804; xml: 527; python: 228; makefile: 172; sh: 67
file content (87 lines) | stat: -rwxr-xr-x 2,093 bytes parent folder | download | duplicates (3)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

ORIGDIR=`pwd`
cd $srcdir
PROJECT=chafa
TEST_TYPE=-f
FILE=chafa/Makefile.am
DIE=0

MISSING_TOOLS=

GTKDOCIZE=$(which gtkdocize 2>/dev/null)
if test -z $GTKDOCIZE; then
        echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
        rm -f gtk-doc.make
        cat > gtk-doc.make <<EOF
EXTRA_DIST =
CLEANFILES =
EOF
else
        gtkdocize || exit $?
fi

(autoconf --version) < /dev/null > /dev/null 2>&1 || {
        MISSING_TOOLS="${MISSING_TOOLS}autoconf "
        DIE=1
}

(automake --version) < /dev/null > /dev/null 2>&1 || {
        MISSING_TOOLS="${MISSING_TOOLS}automake "
        DIE=1
}

(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
        MISSING_TOOLS="${MISSING_TOOLS}libtool "
        DIE=1
}

if test "$DIE" -eq 1; then
        echo
        echo "The following tools were not found: $MISSING_TOOLS"
        echo
        echo "These are required for building Chafa from its git repository."
        echo "You should be able to install them using your operating system's"
        echo "package manager (apt-get, yum, zypper or similar). Alternately"
        echo "they can be obtained directly from GNU: http://ftp.gnu.org/gnu/"
        echo
        exit 1
fi

test $TEST_TYPE $FILE || {
        echo
        echo "You must run this script in the top-level $PROJECT directory"
        echo
        exit 1
}

if test -z "$*"; then
        echo
        echo "I am going to run ./configure with no arguments - if you wish "
        echo "to pass any to it, please specify them on the $0 command line."
        echo
fi

am_opt="--include-deps --add-missing"

echo "Running libtoolize..."
libtoolize --force --copy

echo "Running aclocal..."
aclocal $ACLOCAL_FLAGS

# optionally feature autoheader
(autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader

echo "Running automake..."
automake -a $am_opt

echo "Running autoconf..."
autoconf

cd $ORIGDIR
$srcdir/configure --enable-maintainer-mode "$@"