appliance: Set default guestfs appliance path to $libdir/guestfs.

For unclear reasons this broke recently, although the breakage is only
reproducible in Fedora Koji.  It appears to be caused by the
calculation of the internal autoconf variable $acl_libdirstem
changing.  In the reproducer system:

checking for the common suffixes of directories in the library search path... lib,lib,lib64

On my local system:

checking for the common suffixes of directories in the library search path... lib64,lib64

My local system would be the correct one.  The actual code that
calculates this does some crazy stuff with ‘gcc -print-search-dirs’
which would hint that this output has changed in some way that subtly
breaks the generated configure script.  However even with match GCC
versions on my local system I could still not reproduce the issue.

None of this matters, as the easiest fix here is simply to stop using
internal autoconf variables at all.  I also added some AC_MSG_*
statements so we can more easily see what's going on in the configure
output.

Fixes commit 0f79400c7f.
This commit is contained in:
Richard W.M. Jones
2020-05-06 12:31:56 +01:00
parent 26324d5445
commit 94ff24b880

View File

@@ -126,11 +126,13 @@ AC_ARG_WITH([extra-packages],
AC_SUBST([EXTRA_PACKAGES])
dnl Set guestfs default path
AC_MSG_CHECKING([for guestfs path])
AC_ARG_WITH([guestfs-path],
[AS_HELP_STRING([--with-guestfs-path=PATH],
[specify guestfs path (default=$libdir/guestfs)])],
[GUESTFS_DEFAULT_PATH="$withval"],
[GUESTFS_DEFAULT_PATH="${acl_final_exec_prefix}/${acl_libdirstem}/guestfs"])
[GUESTFS_DEFAULT_PATH="$libdir/guestfs"])
AC_MSG_RESULT([$GUESTFS_DEFAULT_PATH])
AC_SUBST([GUESTFS_DEFAULT_PATH])
AC_DEFINE_UNQUOTED([GUESTFS_DEFAULT_PATH], ["$GUESTFS_DEFAULT_PATH"],