Set DESTDIR if relative loading

When relative loading, `prefix` makes no sense actually.  Use the
given (or default) path as `DESTDIR` instead.

This change affects only when the relative loading is enabled and the
destdir is not given, and does not change the final installation path,
but makes the configuration options simpler a little.
This commit is contained in:
Nobuyoshi Nakada 2025-11-30 14:31:34 +09:00
parent 806e554cc0
commit d7cfd275f8
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2025-11-30 06:09:30 +00:00

View File

@ -4753,6 +4753,11 @@ AC_ARG_WITH(destdir,
[DESTDIR="$withval"])
AC_SUBST(DESTDIR)
AS_IF([test "x$load_relative:$DESTDIR" = xyes:], [
AS_IF([test "x$prefix" = xNONE], [DESTDIR="$ac_default_prefix"], [DESTDIR="$prefix"])
prefix=/.
])
AC_OUTPUT
}