bugs: consider (optionally) including Irani-Peleg within ensemble generation.
[libale.git] / bootstrap
bloba4e6b197337c9132dbc29cbc3dbb98631757eafe
1 #!/bin/bash
3 # Copyright 2008 David Hilvert <dhilvert@gmail.com>
5 # This file is part of libale.
7 # libale is free software: you can redistribute it and/or modify it under the
8 # terms of the GNU Affero General Public License as published by the Free
9 # Software Foundation, either version 3 of the License, or (at your option)
10 # any later version.
12 # libale is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
15 # more details.
17 # You should have received a copy of the GNU Affero General Public License
18 # along with libale. If not, see <http://www.gnu.org/licenses/>.
20 ###
21 ### 'bootstrap' generates build files for distribution.
22 ###
25 # Check for the existence of a configure script.
28 if test -e configure && test "x$1" != "x-r"; then
29 echo
30 echo "To install:"
31 echo "1) Run './configure'."
32 echo "2) Run 'make'."
33 echo "3) Run 'make install'."
34 echo ""
35 echo "* To regenerate configure, run '$0 -r'"
36 echo
37 exit
40 function bootstrap_error {
41 exit
45 # Look for files we might need.
48 if ! test -e /usr/share/autoconf-archive/ax_cflags_warn_all.m4; then
49 echo "Cannot find /usr/share/autoconf-archive/ax_cflags_warn_all.m4. Is autoconf-archive installed?"
50 bootstrap_error
53 if ! which autoreconf &> /dev/null; then
54 echo "Cannot find autoreconf. Is autoconf installed?"
55 bootstrap_error
58 if ! which automake &> /dev/null; then
59 echo "Cannot find automake."
60 bootstrap_error
63 if ! which libtool &> /dev/null; then
64 echo "Cannot find libtool."
65 bootstrap_error
69 # Add autoconf archive files.
72 cp /usr/share/autoconf-archive/ax_cflags_warn_all.m4 m4/.
73 cp /usr/share/autoconf-archive/ac_c_long_long.m4 m4/.
76 # Run autotools' bootstrap script, adding things that automake thinks are
77 # missing, among other things (--install).
80 autoreconf --install
83 # Indicate that we're done.
86 echo ""
87 echo "Done."
90 # Tell the user what to do next.
93 echo
94 echo "To install:"
95 echo "1) Run './configure'."
96 echo "2) Run 'make'."
97 echo "3) Run 'make install'."