File: autogen.sh

package info (click to toggle)
spatialindex 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,272 kB
  • sloc: cpp: 65,051; python: 2,895; sh: 1,952; ansic: 579; makefile: 485
file content (59 lines) | stat: -rwxr-xr-x 1,176 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
#!/bin/sh
# $Id: autogen.sh 61 2007-12-11 20:13:48Z hobu $
#
# Autotools boostrapping script
#
giveup()
{
        echo
        echo "  Something went wrong, giving up!"
        echo
        exit 1
}

OSTYPE=`uname -s`

for libtoolize in glibtoolize libtoolize; do
    if which $libtoolize 1>/dev/null 2>/dev/null; then
        LIBTOOLIZE=`which $libtoolize 2>/dev/null`
        break;
    fi
done

if test "$LIBTOOLIZE" = ""; then
    echo
    echo "  glibtoolize or libtoolize not found. Giving up!"
    echo
    exit 1
fi


doit()
{

	#AMFLAGS="--add-missing --copy --force-missing"
	AMFLAGS="--add-missing --copy"
	if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
	   AMFLAGS=$AMFLAGS" --include-deps";
	fi

	cd $1
	echo "Running aclocal"
	aclocal || giveup
	#echo "Running autoheader"
	#autoheader || giveup
	echo "Running libtoolize"
	$LIBTOOLIZE --force --copy || giveup
	echo "Running automake"
	automake $AMFLAGS # || giveup
	echo "Running autoconf"
	autoconf || giveup

	echo "======================================"
	echo "Now you are ready to run './configure'"
	echo "======================================"
	cd -
}

doit "test/gtest/gtest-1.7.0"
doit "."