forked from Synopsys-SIG-RnD/zlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
50 lines (40 loc) · 902 Bytes
/
autogen.sh
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
#!/bin/sh
#
function good_or_bad {
if [ $? -eq 0 ]; then
echo OK
else
echo FAILED
fi
}
function rename_makefile {
if [ -f $1 ]; then
mv $1 $1.old_static
else
echo
echo "Already renamed?"
fi
}
echo -n "Finding version and setting it up for autoconf.... "
VERSION_STRING=$(sed -e 's/.*ZLOG_VERSION.*"\(.*\)"/\1/g' src/version.h)
sed -i "s/\[VERSION\]/[${VERSION_STRING}]/g" configure.ac
good_or_bad
echo -n "Renaming original static makefiles.... "
rename_makefile test/makefile && \
rename_makefile src/makefile && \
rename_makefile doc/makefile && \
rename_makefile makefile
good_or_bad
echo -n "Running aclocal ..... "
aclocal
good_or_bad
echo -n "Run libtoolize ..... "
libtoolize -fc
good_or_bad
echo -n "Running autoconf ..... "
autoconf
good_or_bad
echo -n "Running automake ..... "
automake -afic
good_or_bad
echo "Now run ./configure <parameters> to configure application"