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)
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
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/>.
21 ### 'bootstrap' generates build files for distribution.
25 # Check for the existence of a configure script.
28 if test -e configure
&& test "x$1" != "x-r"; then
31 echo "1) Run './configure'."
33 echo "3) Run 'make install'."
35 echo "* To regenerate configure, run '$0 -r'"
40 function bootstrap_error
{
45 # Look for files we might need.
48 if ! which autoreconf
&> /dev
/null
; then
49 echo "Cannot find autoreconf. Is autoconf installed?"
53 if ! which automake
&> /dev
/null
; then
54 echo "Cannot find automake."
58 if ! which libtool
&> /dev
/null
; then
59 echo "Cannot find libtool."
63 if ! test -e /usr
/share
/autoconf-archive
/acx_pthread.
m4; then
64 echo "Cannot find /usr/share/autoconf-archive/acx_pthread.m4. Is autoconf-archive installed?"
68 if ! test -e /usr
/share
/aclocal
/guile.
m4 &> /dev
/null
; then
69 echo "Cannot find /usr/share/aclocal/guile.m4. Is guile-1.8-dev (or later) installed?"
73 if ! which swig
&> /dev
/null
; then
74 echo "Cannot find swig."
79 # Add autoconf archive files.
82 cp /usr
/share
/autoconf-archive
/acx_pthread.
m4 m
4/.
83 cp /usr
/share
/autoconf-archive
/ax_lang_compiler_ms.
m4 m
4/.
84 cp /usr
/share
/autoconf-archive
/ax_check_gl.
m4 m
4/.
85 cp /usr
/share
/autoconf-archive
/ax_check_glu.
m4 m
4/.
86 cp /usr
/share
/autoconf-archive
/ax_check_glut.
m4 m
4/.
87 cp /usr
/share
/autoconf-archive
/ax_cflags_warn_all.
m4 m
4/.
88 cp /usr
/share
/autoconf-archive
/ac_c_long_long.
m4 m
4/.
91 # Run autotools' bootstrap script, adding things that automake thinks are
92 # missing, among other things (--install).
98 # Generate bindings with swig.
101 swig
-guile -Iinclude -o src
/libale-guile.c src
/libale-guile.i
104 # Indicate that we're done.
111 # Tell the user what to do next.
116 echo "1) Run './configure'."
117 echo "2) Run 'make'."
118 echo "3) Run 'make install'."