summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac60
-rw-r--r--scp2/source/ooo/vc_redist.scp15
2 files changed, 37 insertions, 38 deletions
diff --git a/configure.ac b/configure.ac
index a3f00fddd585..f6937648fe2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6703,35 +6703,23 @@ find_winsdk()
find_msms()
{
# Return value: $msmdir
+ local version="$1"
- AC_MSG_CHECKING([for MSVC merge modules directory])
- local my_msm_files
+ AC_MSG_CHECKING([for MSVC $version merge modules directory])
+ local my_msm_file="Microsoft_VC${version}_CRT_x86.msm"
local my_msm_dir
- dnl Order my_msm_files in increasing order. Then check the directories returned
- dnl by ls in an inner loop; assuming they are also ordered in increasing order,
- dnl the result will be the highest MSM version found in the highest directory.
-
- case "$VCVER" in
- 16.0 | 17.0 | 17.4)
- my_msm_files="Microsoft_VC141_CRT_x86.msm Microsoft_VC142_CRT_x86.msm Microsoft_VC143_CRT_x86.msm ${my_msm_files}"
- ;;
- esac
- for f in $my_msm_files; do
- echo "$as_me:$LINENO: searching for $f" >&5
- done
+ echo "$as_me:$LINENO: searching for $my_msm_file" >&5
msmdir=
case "$VCVER" in
16.0 | 17.0 | 17.4)
- for f in ${my_msm_files}; do
- for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
- my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
- echo "$as_me:$LINENO: looking for $my_msm_dir${f}])" >&5
- if test -e "$my_msm_dir${f}"; then
- msmdir=$my_msm_dir
- fi
- done
+ for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
+ my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
+ echo "$as_me:$LINENO: looking for $my_msm_dir${my_msm_file}])" >&5
+ if test -e "$my_msm_dir${my_msm_file}"; then
+ msmdir=$my_msm_dir
+ fi
done
;;
esac
@@ -6744,7 +6732,7 @@ find_msms()
AC_MSG_FAILURE([not found])
else
AC_MSG_WARN([not found (check config.log)])
- add_warning "MSM none of ${my_msm_files} found"
+ add_warning "MSM ${my_msm_file} not found"
fi
fi
}
@@ -8565,25 +8553,25 @@ AC_ARG_WITH(ucrt-dir,
UCRT_REDISTDIR="$with_ucrt_dir"
if test $_os = "WINNT"; then
find_msvc_x64_dlls
- for i in $PKGFORMAT; do
- if test "$i" = msi; then
- find_msms
- break
- fi
- done
MSVC_DLL_PATH=`win_short_path_for_make "$msvcdllpath"`
MSVC_DLLS="$msvcdlls"
- test -n "$msmdir" && MSM_PATH=`win_short_path_for_make "$msmdir"`
- # MSVC 15.3 changed it to VC141
if echo "$msvcdllpath" | grep -q "VC143.CRT$"; then
- SCPDEFS="$SCPDEFS -DWITH_VC143_REDIST"
+ with_redist=143
elif echo "$msvcdllpath" | grep -q "VC142.CRT$"; then
- SCPDEFS="$SCPDEFS -DWITH_VC142_REDIST"
+ with_redist=142
elif echo "$msvcdllpath" | grep -q "VC141.CRT$"; then
- SCPDEFS="$SCPDEFS -DWITH_VC141_REDIST"
- else
- SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
+ with_redist=141
fi
+ for i in $PKGFORMAT; do
+ if test "$i" = msi; then
+ find_msms "$with_redist"
+ if test -n "$msmdir"; then
+ MSM_PATH=`win_short_path_for_make "$msmdir"`
+ SCPDEFS="$SCPDEFS -DWITH_VC_REDIST=$with_redist"
+ fi
+ break
+ fi
+ done
if test "$UCRT_REDISTDIR" = "no"; then
dnl explicitly disabled
diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp
index 75ccf2b8d09d..3fe7af2b978b 100644
--- a/scp2/source/ooo/vc_redist.scp
+++ b/scp2/source/ooo/vc_redist.scp
@@ -18,16 +18,27 @@
#include "macros.inc"
-#if defined(WITH_VC142_REDIST)
+#if defined(WITH_VC_REDIST)
+#if WITH_VC_REDIST == 143
+ #define WINDOWS_X64_MERGEMODULE gid_MergeModule_Microsoft_VC143_CRT_x64
+ #define WINDOWS_X64_MERGEMODULE_FILE "Microsoft_VC143_CRT_x64.msm"
+ #define WINDOWS_X86_MERGEMODULE gid_MergeModule_Microsoft_VC143_CRT_x86
+ #define WINDOWS_X86_MERGEMODULE_FILE "Microsoft_VC143_CRT_x86.msm"
+#elif WITH_VC_REDIST == 142
#define WINDOWS_X64_MERGEMODULE gid_MergeModule_Microsoft_VC142_CRT_x64
#define WINDOWS_X64_MERGEMODULE_FILE "Microsoft_VC142_CRT_x64.msm"
#define WINDOWS_X86_MERGEMODULE gid_MergeModule_Microsoft_VC142_CRT_x86
#define WINDOWS_X86_MERGEMODULE_FILE "Microsoft_VC142_CRT_x86.msm"
-#elif defined(WITH_VC141_REDIST)
+#elif WITH_VC_REDIST == 141
#define WINDOWS_X64_MERGEMODULE gid_MergeModule_Microsoft_VC141_CRT_x64
#define WINDOWS_X64_MERGEMODULE_FILE "Microsoft_VC141_CRT_x64.msm"
#define WINDOWS_X86_MERGEMODULE gid_MergeModule_Microsoft_VC141_CRT_x86
#define WINDOWS_X86_MERGEMODULE_FILE "Microsoft_VC141_CRT_x86.msm"
+#else
+ // The next string will result in "malformed par file" error, terminating build as expected.
+ // Possibly a new version of CRT was enabled in configure.ac, but not handled here yet?
+ error: unknown VC redist version WITH_VC_REDIST. Check configure.ac
+#endif
#endif
#if defined(WINDOWS_X86_MERGEMODULE)