forked from sigblips/SonATA
-
Notifications
You must be signed in to change notification settings - Fork 3
/
autogen.sh
executable file
·122 lines (99 loc) · 3 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/sh
################################################################################
#
# File: autogen.sh
# Project: SonATA
# Authors: The OpenSonATA code is the result of many programmers
# over many years
#
# Copyright 2011 The SETI Institute
#
# OpenSonATA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenSonATA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenSonATA. If not, see<http://www.gnu.org/licenses/>.
#
# Implementers of this code are requested to include the caption
# "Licensed through SETI" with a link to setiQuest.org.
#
# For alternate licensing arrangements, please contact
# The SETI Institute at www.seti.org or setiquest.org.
#
################################################################################
#The next three line enables autogen to run from any directory.#
pathautogen="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
curpath=`dirname "$pathautogen"`
cd $curpath
echo "Checking whether the system fulfils the minimum requirements"
sleep 1
quo=`awk 'match($1,"MemTotal") == 1 {print $2}' /proc/meminfo`
div=1048576
ram=`echo "scale=2;$quo/$div" | bc`
if [ `echo "$ram < 3.8" | bc` -eq 1 ]
then
echo "Insufficient ram to run the SonATA"
sleep 1
echo "But SonATA may be build though it will not run probably."
echo "Would you like to continue building it?"
while true; do
read choice
case $choice in
[Yy]* ) echo "Continuing with the build";break;;
[Nn]* ) echo "Aborting the build";exit 1;;
* ) echo "Please answer yes or no.";;
esac
done
fi
cores_no=`cat /proc/cpuinfo | grep ^processor | wc -l`
if [ $cores_no -lt 2 ]
then
echo "SonATA requires 2 cores to run. You seem to have only one."
sleep 1
echo "But SonATA may be build though it will not run probably."
echo "Would you like to continue building it?"
while true; do
read choice
case $choice in
[Yy]* ) echo "Continuing with the build";break;;
[Nn]* ) echo "Aborting the build";exit 1;;
* ) echo "Please answer yes or no.";;
esac
done
fi
echo "libtoolize"
libtoolize --force --automake
echo "aclocal"
aclocal
echo "autoheader"
autoheader
echo "autoconf"
autoconf
echo "automake"
automake --add-missing --force-missing
echo "Running Autotools in tclreadline"
cd tclreadline
./autogen.sh
cd ..
echo "Running Autotools in CppUnit"
cd CppUnit
./autogen.sh
cd ..
echo "Running Autotools in sse-pkg"
cd sse-pkg
./autogen.sh
cd ..
echo "Running Autotools in sig-pkg"
cd sig-pkg
./autogen.sh
cd ..
echo "Running Autotools in scripts"
cd scripts
./autogen.sh