mirror of
https://github.com/AuxXxilium/kmod.git
synced 2025-02-20 08:26:55 +07:00
configure: Check that provided paths are absolute
configure checks that its built-in directory options get an absolute path. Copy the check for custom options. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Link: https://lore.kernel.org/r/8aff0c9c491d8afeec7f6b2cd96cbd0439e26fbb.1699618135.git.msuchanek@suse.de Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
parent
9d1fb317c8
commit
48b0c75f79
17
configure.ac
17
configure.ac
@ -97,6 +97,23 @@ AC_ARG_WITH([module_directory],
|
||||
[], [with_module_directory=/lib/modules])
|
||||
AC_SUBST([module_directory], [$with_module_directory])
|
||||
|
||||
# Check all directory arguments for consistency.
|
||||
for ac_var in distconfdir rootlibdir module_directory
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
case $ac_val in
|
||||
*/ )
|
||||
ac_val=`expr "X$ac_val" : 'X\(.*@<:@^/@:>@\)' \| "X$ac_val" : 'X\(.*\)'`
|
||||
eval $ac_var=\$ac_val;;
|
||||
esac
|
||||
# Be sure to have absolute directory names.
|
||||
case $ac_val in
|
||||
@<:@\\/$@:>@* | ?:@<:@\\/@:>@* ) continue;;
|
||||
esac
|
||||
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
|
||||
done
|
||||
|
||||
AC_ARG_WITH([zstd],
|
||||
AS_HELP_STRING([--with-zstd], [handle Zstandard-compressed modules @<:@default=disabled@:>@]),
|
||||
[], [with_zstd=no])
|
||||
|
Loading…
Reference in New Issue
Block a user