File: autogen.sh

package info (click to toggle)
kino 0.75-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,896 kB
  • ctags: 3,400
  • sloc: cpp: 26,587; sh: 6,028; ansic: 4,878; makefile: 310; perl: 125
file content (77 lines) | stat: -rw-r--r-- 1,892 bytes parent folder | download
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
#!/bin/bash
# Run this to generate all the initial makefiles, etc.

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

PKG_NAME="Kino"

(test -f $srcdir/configure.in) || {
    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
    echo " top-level directory"
    exit 1
}

DIE=0
export AUTOCONF=autoconf
export AUTOMAKE=automake

function autoconf_version_msg() {
    echo
    echo "You must have autoconf 2.50 or greater."
    echo "Get the latest version from ftp://ftp.gnu.org/gnu/autoconf/"
    DIE=1
}

($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
    autoconf_version_msg
}

autoconf_major=`$AUTOCONF --version | head -n 1 | sed 's/^[^0-9]*//' | sed 's/\([0-9]*\).\([0-9]*\)/\1/'`
autoconf_minor=`$AUTOCONF --version | head -n 1 | sed 's/^[^0-9]*//' | sed 's/\([0-9]*\).\([0-9]*\)/\2/'`

if [ $autoconf_major -le 2 ]; then
	if [ $autoconf_major -lt 2 ]; then
		autoconf_version_msg
	fi
fi

function automake_version_msg () { 
    echo
    echo "You must have automake 1.5 or greater."
    echo "Get the latest version from ftp://ftp.gnu.org/gnu/automake/"
    DIE=1
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
    automake_version_msg
}


automake_major=`$AUTOMAKE --version | head -n 1 | sed 's/^.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\(-[^-]*\)*/\1/'`
automake_minor=`$AUTOMAKE --version | head -n 1 | sed 's/^.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\(-[^-]*\)*/\2/'`

if [ $automake_major -le 1 ]; then
	if [ $automake_major -lt 1 ]; then
		automake_version_msg
	fi
fi


if test "$DIE" -eq 1; then
	exit 1
fi

if test -z "$GNOME2_DIR" ; then
    GNOME_COMMON_DATADIR="/usr/share"
else
    GNOME_COMMON_DATADIR="$GNOME2_DIR/share"
fi
GNOME_COMMON_MACROS_DIR="`pwd`/macros"
export GNOME_COMMON_DATADIR
export GNOME_COMMON_MACROS_DIR

ACLOCAL_FLAGS="-I $GNOME_COMMON_MACROS_DIR $ACLOCAL_FLAGS"
export ACLOCAL_FLAGS

. $GNOME_COMMON_MACROS_DIR/autogen.sh