-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathautogen.sh
executable file
·70 lines (55 loc) · 1.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
#!/bin/bash
# Run this to generate all the initial makefiles, etc.
# This was lifted from the Gimp, and adapted slightly by
# Raph Levien .
DIE=0
PROJECT="E-Cell"
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
DIE=1
}
if libtoolize --version < /dev/null > /dev/null 2>&1; then
LIBTOOLIZE=libtoolize
elif glibtoolize --version < /dev/null > /dev/null 2>&1; then
LIBTOOLIZE=glibtoolize
else
echo
echo "You must have libtool installed to compile $PROJECT."
DIE=1
fi
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
case $CC in
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
esac
[ ! -e doc/users-manual/users-manual ] && mkdir -p doc/users-manual/users-manual
. ./ecell_version.sh
for dir in . libltdl dmtool ecell
do
if echo | sed -E 2>/dev/null; then
top_srcdir=`echo $dir | sed -E -e 's#([^./][^/]*|.[^/][^/]*)(/|$)#..\2#g'`
else
top_srcdir=`echo $dir | sed -e 's#\([^./][^/]*\|\.[^/][^/]*\)\(/\|$\)#..\2#g'`
fi
echo -n "Running autotools for $dir ... "
(cd $dir; \
{ if [ -r configure.ac.in ]; then echo -n 'configure.ac ' && sed -e "s/@ECELL_VERSION_NUMBER@/$ECELL_VERSION_NUMBER/g" configure.ac.in > configure.ac; fi } && \
{ echo -n 'libtoolize '; $LIBTOOLIZE -c --force --automake; } && \
{ echo -n 'aclocal '; aclocal ; } && \
{ echo -n 'autoheader '; autoheader -f ; } && \
{ echo -n 'automake '; automake -c --add-missing --gnu $am_opt; } && \
{ echo -n 'autoconf '; autoconf; } && \
echo )
if test $? != 0 ; then
echo "Error processing $dir"
exit $?
fi
done
echo 'Finished running autotools. Run ./configure next.'