./run: Don't set LIBGUESTFS_PATH if --disable-appliance.

Thanks Dave Vasilevsky for spotting this problem.
This commit is contained in:
Richard W.M. Jones
2013-05-09 17:44:44 +01:00
parent 55eae0af3b
commit 6a1c76807e
2 changed files with 15 additions and 8 deletions

View File

@@ -429,10 +429,11 @@ AC_MSG_CHECKING([if we should build the appliance])
AC_ARG_ENABLE([appliance],
[AS_HELP_STRING([--enable-appliance],
[enable building the appliance @<:@default=yes@:>@])],
[],
[enable_appliance=yes])
AM_CONDITIONAL([ENABLE_APPLIANCE],[test "x$enable_appliance" = "xyes"])
AC_MSG_RESULT([$enable_appliance])
[ENABLE_APPLIANCE="$enableval"],
[ENABLE_APPLIANCE=yes])
AM_CONDITIONAL([ENABLE_APPLIANCE],[test "x$ENABLE_APPLIANCE" = "xyes"])
AC_MSG_RESULT([$ENABLE_APPLIANCE])
AC_SUBST([ENABLE_APPLIANCE])
dnl Check for supermin >= 4.1.0 or febootstrap >= 3.20.
AC_CHECK_PROGS([SUPERMIN],
@@ -486,7 +487,7 @@ AC_ARG_WITH([supermin-extra-options],
AC_SUBST([SUPERMIN_EXTRA_OPTIONS])
if test "x$enable_appliance" = "xyes"; then
if test "x$ENABLE_APPLIANCE" = "xyes"; then
test "x$SUPERMIN" = "xno" &&
AC_MSG_ERROR([supermin (formerly called febootstrap) must be installed])
dnl febootstrap 2.x did not support the --version parameter
@@ -1646,7 +1647,7 @@ echo
echo "This is how we have configured the optional components for you today:"
echo
echo "Daemon .............................. $enable_daemon"
echo "Appliance ........................... $enable_appliance"
echo "Appliance ........................... $ENABLE_APPLIANCE"
echo "QEMU ................................ $QEMU $QEMU_OPTIONS"
echo "guestfish and C-based virt tools .... yes"
echo "FUSE filesystem ..................... $enable_fuse"

10
run.in
View File

@@ -62,8 +62,14 @@ export LIBGUESTFS_CACHEDIR="$b/tmp"
mkdir -p "$b/tmp"
chcon --reference=/tmp tmp 2>/dev/null ||:
# Set local environment relative to this script.
export LIBGUESTFS_PATH="$b/appliance"
# Only set path if the appliance was enabled.
if [ "x@ENABLE_APPLIANCE@" = "xyes" ]; then
export LIBGUESTFS_PATH="$b/appliance"
elif [ -z "$LIBGUESTFS_PATH" ]; then
echo "run: error: You used './configure --disable-appliance' so you must put an"
echo "run: error: appliance somewhere and set LIBGUESTFS_PATH to point to it."
exit 1
fi
if [ -z "$LD_LIBRARY_PATH" ]; then
LD_LIBRARY_PATH="$b/src/.libs:$b/gobject/.libs"