File: bootstrap

package info (click to toggle)
smilutils 0.3.0-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,008 kB
  • ctags: 2,647
  • sloc: cpp: 13,066; sh: 8,861; ansic: 8,309; makefile: 294
file content (118 lines) | stat: -rwxr-xr-x 2,909 bytes parent folder | download | duplicates (2)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#! /bin/bash

DIE=0
package=smilutils
srcfile=libkino/frame.cc

# Local settings for autotools, set them
# as appropriate for your system.

export AUTOCONF=autoconf
export AUTOHEADER=autoheader
export AUTOMAKE=automake
export ACLOCAL=aclocal
export LIBTOOLIZE=libtoolize
export LIBTOOL=libtool

# End of local settings

function autoconf_version_msg() {
    echo
    echo "You must have autoconf 2.50 or greater to bootstrap $package."
    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]*\)\([a-z]*\)/\1/'`
autoconf_minor=`$AUTOCONF --version | head -n 1 | sed 's/^[^0-9]*//' | sed 's/\([0-9]*\).\([0-9]*\)\([a-z]*\)/\2/'`

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

function automake_version_msg () { 
    echo
    echo "You must have automake 1.5 or greater to bootstrap $package."
    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
	elif [ $automake_minor -lt 5 ]; then
	    automake_version_msg
	fi
fi

function libtool_version_msg () {
	echo
	echo "You must have libtool 1.4 or greater to bootstrap $package."
	DIE=1
} 

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

libtool_version=`$LIBTOOL --version | sed 's/^.* \([0-9\.]*\) .*$/\1/'`
libtool_major=`echo $libtool_version | cut -d. -f1`
libtool_minor=`echo $libtool_version | cut -d. -f2`
if [ $libtool_major -le 1 ]; then
	if [ $libtool_major -lt 1 ]; then
		libtool_version_msg
	elif [ $libtool_minor -lt 4 ]; then
		libtool_version_msg
	fi
fi

function pkgconfig_version_msg () {
	echo
	echo "You must have pkg-config 0.7.0 or greater to bootstrap $package."
	DIE=1
} 

(pkg-config --version) < /dev/null > /dev/null 2>&1 || {
	pkgconfig_version_msg
}

pkgconfig_major=`pkg-config --version | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
pkgconfig_minor=`pkg-config --version | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`

if [ $pkgconfig_major -lt 1 ]; then
	if [ $pkgconfig_minor -lt 7 ]; then
	    pkgconfig_version_msg
	fi
fi

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

test -f $srcfile || {
	echo "You must run this script in the top-level $package directory"
	exit 1
}

set -x

$LIBTOOLIZE --force --copy \
&& $ACLOCAL \
&& $AUTOHEADER \
&& $AUTOMAKE --gnu --copy --add-missing \
&& $AUTOCONF \
&& ./configure $*