use OVIRT_LOCAL_REPO if present
[ovirt-node-image.git] / autogen.sh
blobe4b75c269822f99b67c1df2c5511773fe766f8aa
1 #!/bin/sh
2 # Run this to generate configure and Makefile
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
7 THEDIR=`pwd`
9 cd $srcdir
10 die=0
12 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
13 echo
14 echo "You must have autoconf installed."
15 echo "Download the appropriate package for your distribution,"
16 echo "or see http://www.gnu.org/software/autoconf"
17 die=1
20 # Require libtool only if one of of LT_INIT,
21 # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac.
22 grep -E '^[[:blank:]]*(LT_INIT|A[CM]_PROG_LIBTOOL)' configure.ac >/dev/null \
23 && {
24 (libtool --version) < /dev/null > /dev/null 2>&1 || {
25 echo
26 echo "You must have libtool installed."
27 echo "Download the appropriate package for your distribution,"
28 echo "or see http://www.gnu.org/software/libtool"
29 die=1
33 (automake --version) < /dev/null > /dev/null 2>&1 || {
34 echo
35 die=1
36 echo "You must have automake installed."
37 echo "Download the appropriate package for your distribution,"
38 echo "or see http://www.gnu.org/software/automake"
41 test $die = 1 && exit 1
43 test -f ovirt-node-image.spec.in || {
44 echo "You must run this script in the top-level directory"
45 exit 1
48 if test -z "$*"; then
49 echo "I am going to run ./configure with no arguments - if you wish "
50 echo "to pass any to it, please specify them on the $0 command line."
53 aclocal
55 # Run autoheader only if needed
56 grep '^[[:blank:]]*AC_CONFIG_HEADERS' configure.ac >/dev/null && autoheader
58 automake --add-missing
59 autoconf
60 ./configure "$@"
63 if test "x$OBJ_DIR" != x; then
64 mkdir -p "$OBJ_DIR"
65 cd "$OBJ_DIR"