forked from rollinhand/libdbf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·80 lines (69 loc) · 2.13 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
#!/bin/sh
#
# autogen.sh glue for CMU Cyrus IMAP
# $Id$
#
# Requires: automake, autoconf, dpkg-dev
set -e
test ! ${OSTYPE} && {
OSTYPE="other"
}
# Check if needed software is available on system
# MSYS is used on Windows
test "${OSTYPE}" = "msys" && {
echo "Detected Operating System: ${OSTYPE}"
}
# Unix-based operating systems
test ${OSTYPE} != "msys" -a ${OSTYPE} != "cygwin" && {
echo "Detected Operating System: ${OSTYPE}"
echo -n "Check Build Environment..."
for tool in aclocal autoreconf autoheader automake libtoolize intltoolize autoconf; do
test ! `whereis ${tool} | awk '{print $2}'` && {
echo " not OK"
echo "${tool} not found - please install first!"
exit
}
done
echo " OK"
}
# Refresh GNU autotools toolchain.
# Test if /usr/share/automake exists, else prove for automake-$version
# This test-case is e.g. needed for SuSE distributions
#automk="automake"
#test ! -d /usr/share/automake && {
# version=`automake --version | head -n 1 | awk '{print $4}' | awk -F. '{print $1"."$2}'`
# automk="automake-${version}"
#}
#for i in config.guess config.sub missing install-sh mkinstalldirs ; do
# test -r /usr/share/${automk}/${i} && {
# rm -f ${i}
# cp /usr/share/${automk}/${i} .
# }
# chmod 755 ${i}
#done
libtoolize --copy --force
aclocal
autoheader
automake --verbose --copy --add-missing
glib-gettextize --force --copy
#autoreconf -i -f -v --warnings=all
intltoolize --copy --force
autoconf
# For the Debian build
test -d debian -a "${OSTYPE}" != "msys" -a "${OSTYPE}" != "cygwin" && {
# Kill executable list first
`rm -f debian/executable.files`
# Make sure our executable and removable lists won't be screwed up
debclean && echo Cleaned buildtree just in case...
# refresh list of executable scripts, to avoid possible breakage if
# upstream tarball does not include the file or if it is mispackaged
# for whatever reason.
echo Generating list of executable files...
`rm -f debian/executable.files`
`find -type f -perm +111 ! -name '.*' -fprint debian/executable.files`
# link these in Debian builds
# rm -f config.sub config.guess
# ln -s /usr/share/misc/config.sub .
# ln -s /usr/share/misc/config.guess .
}
exit 0