]> www.ginac.de Git - ginac.git/blob - autogen.sh
canonicalise_clifford(), clifford_prime() and remove_dirac_ONE() handle matrices...
[ginac.git] / autogen.sh
1 #! /bin/sh
2 # Run this to generate all the initial makefiles, etc.
3 # This was lifted from the Gimp, and adapted slightly by
4 # Christian Bauer.
5
6 DIE=0
7
8 PROG=GiNaC
9
10 # Check how echo works in this /bin/sh
11 case `echo -n` in
12 -n) _echo_n=   _echo_c='\c';;
13 *)  _echo_n=-n _echo_c=;;
14 esac
15
16 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
17         echo
18         echo "You must have autoconf installed to compile $PROG."
19         echo "Download the appropriate package for your distribution,"
20         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
21         DIE=1
22 }
23
24 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
25         echo
26         echo "You must have libtool installed to compile $PROG."
27         echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz"
28         echo "(or a newer version if it is available)"
29         DIE=1
30 }
31
32 (automake --version) < /dev/null > /dev/null 2>&1 || {
33         echo
34         echo "You must have automake installed to compile $PROG."
35         echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.4.tar.gz"
36         echo "(or a newer version if it is available)"
37         DIE=1
38 }
39
40 (aclocal --version) < /dev/null > /dev/null 2>&1 || {
41         echo
42         echo "**Error**: Missing aclocal. The version of automake"
43         echo "installed doesn't appear recent enough."
44         echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.4.tar.gz"
45         echo "(or a newer version if it is available)"
46         DIE=1
47 }
48
49 if test "$DIE" -eq 1; then
50         exit 1
51 fi
52
53 aclocalinclude="$ACLOCAL_FLAGS"; \
54 (echo $_echo_n " + Running aclocal: $_echo_c"; \
55     aclocal $aclocalinclude; \
56  echo "done.") && \
57 (echo $_echo_n " + Running libtoolize: $_echo_c"; \
58     libtoolize --force --copy >/dev/null 2>&1; \
59  echo "done.") && \
60 (echo $_echo_n " + Running autoheader: $_echo_c"; \
61     autoheader; \
62  echo "done.") && \
63 (echo $_echo_n " + Running automake: $_echo_c"; \
64     automake --gnu --add-missing --copy; \
65  echo "done.") && \
66 (echo $_echo_n " + Running autoconf: $_echo_c"; \
67     autoconf; \
68  echo "done.")
69
70 rm -f config.cache
71
72 if [ x"$NO_CONFIGURE" = "x" ]; then
73     echo " + Running 'configure $@':"
74     if [ -z "$*" ]; then
75         echo "   ** If you wish to pass arguments to ./configure, please"
76         echo "   ** specify them on the command line."
77     fi
78     ./configure "$@"
79 fi