diff options
author | Simon McVittie <smcv@collabora.com> | 2018-08-29 14:01:02 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-08-30 17:44:08 +0100 |
commit | 7cae8b427c95a0e30ff7929b61d913409e7a74c6 (patch) | |
tree | eebaf759680ca41d3e82c7131e2eeac214c7ffb3 /configure.ac | |
parent | 87b0bb2451462644a763885e4812f8d27b22c20f (diff) | |
download | dbus-7cae8b427c95a0e30ff7929b61d913409e7a74c6.tar.gz |
build: Give better error messages if relocation is impossible
There are two reasons why we might reject relocation: the exec_prefix
differing from the prefix, or the libdir not being a first-level
subdirectory named "lib" or "lib64" of the prefix. Make it clearer
which one failed and why.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107662
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 8c96e74d..f0d83589 100644 --- a/configure.ac +++ b/configure.ac @@ -1581,17 +1581,23 @@ AS_CASE(["${exec_prefix}"], ['NONE'|'${prefix}'], [:], [*], - [can_relocate=no]) + [ + can_relocate=no + # If the user said --enable-relocation but we can't do it, error out + AS_IF([test "x$enable_relocation" = xyes], + [AC_MSG_ERROR([Relocatable pkg-config metadata requires --exec-prefix='\${prefix}', not ${exec_prefix}])]) + ]) AS_CASE(["${libdir}"], ['${prefix}/lib'|'${prefix}/lib64'|'${exec_prefix}/lib'|'${exec_prefix}/lib64'], [:], [*], - [can_relocate=no]) - -# 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])]) + [ + can_relocate=no + # If the user said --enable-relocation but we can't do it, error out + AS_IF([test "x$enable_relocation" = xyes], + [AC_MSG_ERROR([Relocatable pkg-config metadata requires default libdir, not ${libdir}])]) + ]) # By default, on Windows we are relocatable if possible AS_IF([test "x$enable_relocation" = xauto && test "x$dbus_win" = xyes], |