On Wed, Jun 26, 2019 at 2:40 PM Niels Möller nisse@lysator.liu.se wrote:
Alon Bar-Lev alon.barlev@gmail.com writes:
opt out overriding the libdir, in most cases downstream distribution is providing the correct one
Signed-off-by: Alon Bar-Lev alon.barlev@gmail.com
configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac index 379c021c..fb0b3c8c 100644 --- a/configure.ac +++ b/configure.ac @@ -339,7 +339,11 @@ case "$host_cpu" in ;; esac
-if test "x$ABI" != xstandard ; then +AC_ARG_ENABLE(libdir-abi-detection,
- AC_HELP_STRING([--disable-libdir-abi-detection], [Disable libdir ABI detection]),,
- [enable_libdir_abi_detection=yes])
+if test "x$ABI" != xstandard -a "x${enable_libdir_abi_detection}" = "yes" ; then AC_MSG_NOTICE([Compiler uses $ABI-bit ABI. To change, set CC.]) if test "$libdir" = '${exec_prefix}/lib' ; then # Try setting a better default
Isn't it clearer to use
./configure --prefix=/usr --libdir=/usr/lib
rather than
./configure --prefix=/usr --disable-libdir-abi-detection
The above if test "$libdir" = '${exec_prefix}/lib' disables the automatic choice if you use --libdir=foo, with foo different from the magic string '${exec_prefix}/lib'.
You should not do this in autoconf, autoconf is already detecting everything that is required, having this code is highly non-standard and damage the default detection in many setups. No package should override any of the default directories.
Having said that, and to avoid backward compatibility, I would like to add a switch to disable this behavior completely and relay on the default logic of autoconf as expected.
Thanks!