forked from exult/exult
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·88 lines (74 loc) · 2.78 KB
/
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
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
#!/bin/sh
DIE=0
# Check for availability
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo "**Error**: You must have 'autoconf' installed to compile Exult."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo "**Error**: You must have 'automake' installed to compile Exult."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.4.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo "**Error**: Missing 'aclocal'. The version of 'automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.4.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
libtoolize=""
for l in glibtoolize libtoolize15 libtoolize14 libtoolize ; do
( $l --version < /dev/null > /dev/null 2>&1 ) && {
libtoolize=$l
break
}
done
if test "x$libtoolize" = "x" ; then
echo "**Error**: You must have 'libtool' installed to compile Exult."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
fi
if test "$DIE" -eq 1; then
exit 1
fi
aclocalincludes=""
if test -d "/usr/local/share/aclocal"; then
if test "/usr/local/share/aclocal" != `aclocal --print-ac-dir`; then
aclocalincludes="$aclocalincludes -I /usr/local/share/aclocal"
fi
fi
#if test -d "$HOME/share/aclocal"; then
# if test "$HOME/share/aclocal" != `aclocal --print-ac-dir`; then
# aclocalincludes="$aclocalincludes -I $HOME/share/aclocal"
# fi
#fi
# Clean up the generated crud
rm -f configure config.log config.guess config.sub config.cache
rm -f libtool ltmain.sh missing mkinstalldirs install-sh
rm -f autoconfig.h.in
rm -f config.status aclocal.m4
rm -f `find . -name 'Makefile.in'`
rm -f audio/midi_drivers/Makefile audio/Makefile conf/Makefile data/Makefile \
debian/Makefile desktop/Makefile docs/Makefile files/zip/Makefile \
files/Makefile flic/Makefile gumps/Makefile imagewin/Makefile \
mapedit/Makefile objs/Makefile pathfinder/Makefile server/Makefile \
shapes/Makefile tools/Makefile usecode/compiler/Makefile \
usecode/ucxt/Docs/Makefile usecode/ucxt/data/Makefile \
usecode/ucxt/include/Makefile usecode/ucxt/src/Makefile \
usecode/ucxt/Makefile usecode/Makefile gamemgr/Makefile Makefile
# touch the configure.ac file to force rebuilding configure
touch configure.ac
# Regenerate everything
aclocal $aclocalincludes
$libtoolize --force --copy
autoheader
automake --add-missing --copy --gnu
autoconf
echo "You are now ready to run ./configure"