1#!/bin/sh
2
3#    Copyright (c) 2007-2009 iMatix Corporation
4#    Copyright (c) 2007-2012 Other contributors as noted in the AUTHORS file
5#
6#    This file is part of Crossroads I/O project.
7#
8#    Crossroads I/O is free software; you can redistribute it and/or modify it
9#    under the terms of the GNU Lesser General Public License as published by
10#    the Free Software Foundation; either version 3 of the License, or
11#    (at your option) any later version.
12#
13#    Crossroads is distributed in the hope that it will be useful,
14#    but WITHOUT ANY WARRANTY; without even the implied warranty of
15#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16#    GNU Lesser General Public License for more details.#
17#
18#    You should have received a copy of the GNU Lesser General Public License
19#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
21# Script to generate all required files from fresh git checkout.
22
23command -v libtool >/dev/null 2>&1
24if  [ $? -ne 0 ]; then
25    echo "autogen.sh: error: could not find libtool.  libtool is required to run autogen.sh." 1>&2
26    exit 1
27fi
28
29command -v autoreconf >/dev/null 2>&1
30if [ $? -ne 0 ]; then
31    echo "autogen.sh: error: could not find autoreconf.  autoconf and automake are required to run autogen.sh." 1>&2
32    exit 1
33fi
34
35mkdir -p ./config
36if [ $? -ne 0 ]; then
37    echo "autogen.sh: error: could not create directory: ./config." 1>&2
38    exit 1
39fi
40
41autoreconf --install --force --verbose -I config
42if [ $? -ne 0 ]; then
43    echo "autogen.sh: error: autoreconf exited with status $?" 1>&2
44    exit 1
45fi
46