Commit 5c69eb2b authored by Michal Privoznik's avatar Michal Privoznik

configure: Fix build with --prefix

If source was configured with different --prefix than usual,
local state and sysconfig dir might have improper values. Check
that in configure and set the correct ones.
Signed-off-by: 's avatarMichal Privoznik <mprivozn@redhat.com>
parent 0034a68e
......@@ -21,6 +21,17 @@ AC_CHECK_TOOL([RM], [rm])
dnl Need to test if pkg-config exists
PKG_PROG_PKG_CONFIG
dnl if --prefix is /usr, don't use /usr/var for localstatedir
dnl or /usr/etc for sysconfdir
dnl as this makes a lot of things break in testing situations
if test "$prefix" = "/usr" && test "$localstatedir" = '${prefix}/var' ; then
localstatedir='/var'
fi
if test "$prefix" = "/usr" && test "$sysconfdir" = '${prefix}/etc' ; then
sysconfdir='/etc'
fi
LIBVIRT_REQUIRED=0.6.2
PKG_CHECK_MODULES(LIBVIRT, libvirt >= $LIBVIRT_REQUIRED)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment