-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathautogen.sh
More file actions
executable file
·54 lines (44 loc) · 1.1 KB
/
autogen.sh
File metadata and controls
executable file
·54 lines (44 loc) · 1.1 KB
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
#!/bin/sh
# Script to generate all required files for `configure' when
# starting from a fresh repository checkout.
run()
{
binary_name="$1"
shift
args="$@"
echo -n "Running ${binary_name}... "
binary_path=$( which ${binary_name} 2>/dev/null )
if [ -z "$binary_path" ] || [ ! -x "$binary_path" ] ; then
echo "failed"
echo "Command ${binary_name} not found, please install it"
exit 1
fi
$binary_path $args >/dev/null 2>&1
if [ $? -eq 0 ] ; then
echo "done"
else
echo "failed"
echo "Running ${binary_name} again with errors unmasked:"
$binary_path $args
exit 1
fi
}
rm -f config.cache
rm -f config.log
OLD_PWD="$PWD"
cd $( dirname $0 ) &>/dev/null
run aclocal
run libtoolize --force
run autoconf
run autoheader
run automake --add-missing
cd ${OLD_PWD} &>/dev/null
# run configure with failure on compiler warnings enabled since autogen.sh
# is for developpers not users, also enable HTML and man doc.
chmod +x $( dirname $0 )/configure
$( dirname $0 )/configure \
--enable-fail-on-warning \
--enable-fortify-sources \
--enable-doc-html \
--enable-doc-man \
$@