fix for PR#16552 implementation on windows: CFG_LIBDIR should be always set in configure variables
This commit is contained in:
parent
22513fed35
commit
6ffb7f0132
1 changed files with 14 additions and 10 deletions
24
configure
vendored
24
configure
vendored
|
@ -546,22 +546,26 @@ CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
|
||||||
# there's no rpath. This is where the build system itself puts libraries;
|
# there's no rpath. This is where the build system itself puts libraries;
|
||||||
# --libdir is used to configure the installation directory.
|
# --libdir is used to configure the installation directory.
|
||||||
# FIXME: This needs to parameterized over target triples. Do it in platform.mk
|
# FIXME: This needs to parameterized over target triples. Do it in platform.mk
|
||||||
CFG_LIBDIR_RELATIVE=lib
|
|
||||||
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ]
|
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ]
|
||||||
then
|
then
|
||||||
CFG_LIBDIR_RELATIVE=bin
|
CFG_LIBDIR_RELATIVE=bin
|
||||||
CFG_LIBDIR="${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}"
|
|
||||||
else
|
else
|
||||||
valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries (ignored on windows platform)"
|
CFG_LIBDIR_RELATIVE=lib
|
||||||
|
fi
|
||||||
|
|
||||||
case "$CFG_LIBDIR" in
|
valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries (do not set it on windows platform)"
|
||||||
"$CFG_PREFIX"/*) CAT_INC=2;;
|
|
||||||
"$CFG_PREFIX"*) CAT_INC=1;;
|
|
||||||
*)
|
|
||||||
err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
|
|
||||||
esac
|
|
||||||
|
|
||||||
CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
|
case "$CFG_LIBDIR" in
|
||||||
|
"$CFG_PREFIX"/*) CAT_INC=2;;
|
||||||
|
"$CFG_PREFIX"*) CAT_INC=1;;
|
||||||
|
*)
|
||||||
|
err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
|
||||||
|
|
||||||
|
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ] && [ "$CFG_LIBDIR_RELATIVE" != "bin" ]; then
|
||||||
|
err "libdir on windows should be set to 'bin'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $HELP -eq 1 ]
|
if [ $HELP -eq 1 ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue