Commit 30497f85 authored by Simon McVittie's avatar Simon McVittie Committed by Simon McVittie

autotools: Allow relocatable pkg-config metadata on an opt-in basis

Bug: Ralf Habacker's avatarRalf Habacker <>
Signed-off-by: Simon McVittie's avatarSimon McVittie <>
parent d160c1a7
......@@ -1530,9 +1530,6 @@ AS_AC_EXPAND(EXPANDED_LIBDIR, "$libdir")
# For the moment we don't support relocation when building with Autotools
AC_SUBST([pkgconfig_prefix], ['${original_prefix}'])
#### Check our operating system
if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
......@@ -1694,6 +1691,45 @@ DBUS_LIBEXECDIR="$EXPANDED_LIBEXECDIR"
AC_DEFINE_UNQUOTED(DBUS_LIBEXECDIR,"$DBUS_LIBEXECDIR", [Directory for installing the libexec binaries])
[Make pkg-config metadata relocatable [default=auto]])],
[], [enable_relocation=auto])
# If the user said --enable-relocation but we can't do it, error out
AS_IF([test "x$can_relocate" = xno && test "x$enable_relocation" = xyes],
[AC_MSG_ERROR([Relocatable pkg-config metadata requires --exec-prefix='\${prefix}' and the default libdir])])
# By default, on Windows we are relocatable if possible
AS_IF([test "x$enable_relocation" = xauto && test "x$dbus_win" = xyes],
# By default, on non-Windows we are not relocatable because it can interfere
# with pkg-config's ability to filter out system include directories,
# resulting in linking an outdated system-wide library in preference to a
# newer version installed elsewhere
AS_IF([test "x$enable_relocation" = xauto],
AS_IF([test "x$enable_relocation" = xyes],
[AC_SUBST([pkgconfig_prefix], ['${pcfiledir}/../../'])],
[AC_SUBST([pkgconfig_prefix], ['${original_prefix}'])])
#### Directory to source sysconfdir configuration from
# On Windows this is relative to where we put the bus setup, in
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