File: autogen.sh

package info (click to toggle)
bindfs 1.8-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,504 kB
  • ctags: 148
  • sloc: sh: 8,955; ansic: 1,388; ruby: 120; makefile: 56
file content (57 lines) | stat: -rwxr-xr-x 1,241 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
#!/bin/bash

# Enable environment variables to override tool commands.
: ${AUTOCONF=autoconf}
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake}
: ${ACLOCAL=aclocal}
: ${LIBTOOLIZE=libtoolize}

# Apple calls the GNU libtoolize "glibtoolize"
if [[ ! -x `which "$LIBTOOLIZE"` ]]; then
	LIBTOOLIZE=glibtoolize
fi
if [[ ! -x `which "$LIBTOOLIZE"` ]]; then
	echo "Cannot find libtoolize"
	exit 1
fi

# Add /usr/local/share/aclocal to aclocal's search path
if [[ -d /usr/local/share/aclocal ]]; then
	ACLOCAL="$ACLOCAL -I /usr/local/share/aclocal"
fi

rm -rf autom4te.cache
rm -f aclocal.m4
rm -f missing mkinstalldirs depcomp install-sh libtool

echo "Running $ACLOCAL..."
$ACLOCAL || exit 1

echo "Running $AUTOHEADER..."
$AUTOHEADER || exit 1

echo "Running $AUTOCONF..."
$AUTOCONF || exit 1

echo "Running $LIBTOOLIZE..."
$LIBTOOLIZE --automake --copy --force || exit 1

echo "Running $AUTOMAKE..."
$AUTOMAKE -a -c || exit 1

if [ "$1" == "-d" ]; then
	echo "Running configure with developer options..."
	echo
	sleep 1s
	./configure --enable-debug
elif [ -n "$1" ]; then
	echo
	echo "./configure $@"
	./configure $@
else
	echo
	echo "autogen.sh completed successfully."
	echo "Now run ./configure with the appropriate flags and then make."
fi