2005-11-02 13:19:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
# Run this to generate all the initial makefiles, etc.
|
2020-01-17 16:00:27 +00:00
|
|
|
test -n "$srcdir" || srcdir=$(dirname "$0")
|
|
|
|
|
test -n "$srcdir" || srcdir=.
|
2005-11-02 13:19:10 +00:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
olddir=$(pwd)
|
2005-11-02 13:19:10 +00:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
cd "$srcdir"
|
2005-11-02 13:19:10 +00:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
(test -f src/libvirt.c) || {
|
|
|
|
|
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
|
|
|
|
echo " top-level libvirt directory"
|
|
|
|
|
exit 1
|
2017-04-12 13:09:08 +02:00
|
|
|
}
|
2009-11-26 14:38:50 +00:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
git submodule update --init || exit 1
|
2010-03-16 21:08:31 +01:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
autoreconf --verbose --force --install || exit 1
|
2017-04-12 13:09:08 +02:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
if test "x$1" = "x--system"; then
|
|
|
|
|
shift
|
|
|
|
|
prefix=/usr
|
|
|
|
|
libdir=$prefix/lib
|
|
|
|
|
sysconfdir=/etc
|
|
|
|
|
localstatedir=/var
|
|
|
|
|
if [ -d /usr/lib64 ]; then
|
|
|
|
|
libdir=$prefix/lib64
|
2017-04-12 13:09:08 +02:00
|
|
|
fi
|
2020-01-17 16:00:27 +00:00
|
|
|
EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
|
|
|
|
|
fi
|
2017-04-12 13:09:08 +02:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
cd "$olddir"
|
2017-04-12 13:09:08 +02:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
if [ "$NOCONFIGURE" = "" ]; then
|
|
|
|
|
$srcdir/configure $EXTRA_ARGS "$@" || exit 1
|
2017-04-12 13:09:08 +02:00
|
|
|
|
2020-01-17 16:00:27 +00:00
|
|
|
if [ "$1" = "--help" ]; then
|
|
|
|
|
exit 0
|
2017-04-12 13:09:08 +02:00
|
|
|
else
|
2020-01-17 16:00:27 +00:00
|
|
|
echo "Now type 'make' to compile libvirt" || exit 1
|
2012-10-01 09:10:20 -06:00
|
|
|
fi
|
2010-03-25 17:37:32 -06:00
|
|
|
else
|
2020-01-17 16:00:27 +00:00
|
|
|
echo "Skipping configure process."
|
2017-04-12 13:09:08 +02:00
|
|
|
fi
|