configure.ac                              |   63 ++++++++++++++++++------------
 external/firebird/firebird-vs2017.patch.1 |    7 +--
 2 files changed, 41 insertions(+), 29 deletions(-)

New commits:
commit 0b56a61207de9b3a39dfb394996eaaf7e1d4dfb4
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Aug 15 14:00:56 2018 +0200
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Wed Nov 15 00:00:59 2023 +0000

    Allow all _MSC_VER up to (excluding) 2000 (Firebird)
    
    (see 
https://blogs.msdn.microsoft.com/vcblog/2016/10/05/visual-c-compiler-version/)
    
    Change-Id: I69133a3742f72c20daa0ad94e093e4fffbd5d8c2
    Reviewed-on: https://gerrit.libreoffice.org/59097
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/external/firebird/firebird-vs2017.patch.1 
b/external/firebird/firebird-vs2017.patch.1
index a4dad62e34a9..609f380a3e46 100644
--- a/external/firebird/firebird-vs2017.patch.1
+++ b/external/firebird/firebird-vs2017.patch.1
@@ -4,9 +4,8 @@ diff -ru firebird.orig/src/common/os/win32/mod_loader.cpp 
firebird/src/common/os
 @@ -103,6 +103,6 @@
                                        "msvcr120.dll",
 -#elif _MSC_VER == 1900
--                                      "vcruntime140.dll",
-+#elif _MSC_VER >= 1900 && _MSC_VER <= 1914
-+                                      "vcruntime140.dll",
++#elif _MSC_VER >= 1900 && _MSC_VER < 2000
+                                       "vcruntime140.dll",
  #else
                      #error Specify CRT DLL name here !
  #endif
commit 3771e5c3fa0b5cf3c5af7298c52762b94e77fc28
Author:     himajin100000 <himajin100...@gmail.com>
AuthorDate: Thu Mar 29 03:09:08 2018 +0900
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Wed Nov 15 00:00:38 2023 +0000

    Suppport _MSC_VER 1913 and 1914(Firebird)
    
    Change-Id: Ifeab9119fcc1037365251cd49dd7714cc37b3012
    Reviewed-on: https://gerrit.libreoffice.org/52164
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/external/firebird/firebird-vs2017.patch.1 
b/external/firebird/firebird-vs2017.patch.1
index 7d140589c881..a4dad62e34a9 100644
--- a/external/firebird/firebird-vs2017.patch.1
+++ b/external/firebird/firebird-vs2017.patch.1
@@ -1,11 +1,11 @@
 diff -ru firebird.orig/src/common/os/win32/mod_loader.cpp 
firebird/src/common/os/win32/mod_loader.cpp
 --- firebird.orig/src/common/os/win32/mod_loader.cpp   2017-02-15 
22:11:48.939042400 +0100
 +++ firebird/src/common/os/win32/mod_loader.cpp        2017-02-15 
22:12:30.062262700 +0100
-@@ -103,6 +103,8 @@
+@@ -103,6 +103,6 @@
                                        "msvcr120.dll",
- #elif _MSC_VER == 1900
-                                       "vcruntime140.dll",
-+#elif _MSC_VER == 1910 || _MSC_VER == 1911 || _MSC_VER == 1912
+-#elif _MSC_VER == 1900
+-                                      "vcruntime140.dll",
++#elif _MSC_VER >= 1900 && _MSC_VER <= 1914
 +                                      "vcruntime140.dll",
  #else
                      #error Specify CRT DLL name here !
commit 97f496f1b4d74b8d79980cf5fee577bf41074559
Author:     Michael Stahl <mst...@redhat.com>
AuthorDate: Fri Jan 19 14:53:57 2018 +0100
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Tue Nov 14 23:29:56 2023 +0000

    firebird: recognise MSVC 2017.5 (which defines _MSC_VER=1912)
    
    Change-Id: Ic526bc3babfd342fd2ebb10003639d600a668ae5

diff --git a/external/firebird/firebird-vs2017.patch.1 
b/external/firebird/firebird-vs2017.patch.1
index b1d6b1b6b49e..7d140589c881 100644
--- a/external/firebird/firebird-vs2017.patch.1
+++ b/external/firebird/firebird-vs2017.patch.1
@@ -1,13 +1,11 @@
 diff -ru firebird.orig/src/common/os/win32/mod_loader.cpp 
firebird/src/common/os/win32/mod_loader.cpp
 --- firebird.orig/src/common/os/win32/mod_loader.cpp   2017-02-15 
22:11:48.939042400 +0100
 +++ firebird/src/common/os/win32/mod_loader.cpp        2017-02-15 
22:12:30.062262700 +0100
-@@ -103,6 +103,10 @@
+@@ -103,6 +103,8 @@
                                        "msvcr120.dll",
  #elif _MSC_VER == 1900
                                        "vcruntime140.dll",
-+#elif _MSC_VER == 1910
-+                                      "vcruntime140.dll",
-+#elif _MSC_VER == 1911
++#elif _MSC_VER == 1910 || _MSC_VER == 1911 || _MSC_VER == 1912
 +                                      "vcruntime140.dll",
  #else
                      #error Specify CRT DLL name here !
commit a325b02029d7e070e329727ad89a5754663120fc
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Sep 7 15:39:49 2017 +0200
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Tue Nov 14 23:29:49 2023 +0000

    Fix firebird build with MSVC update 15.3
    
    Change-Id: I236f182fd99e19e4ea171ad1bae6c03f1a258c7e
    Reviewed-on: https://gerrit.libreoffice.org/42060
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>

diff --git a/external/firebird/firebird-vs2017.patch.1 
b/external/firebird/firebird-vs2017.patch.1
index ba747b3470f4..b1d6b1b6b49e 100644
--- a/external/firebird/firebird-vs2017.patch.1
+++ b/external/firebird/firebird-vs2017.patch.1
@@ -1,11 +1,13 @@
 diff -ru firebird.orig/src/common/os/win32/mod_loader.cpp 
firebird/src/common/os/win32/mod_loader.cpp
 --- firebird.orig/src/common/os/win32/mod_loader.cpp   2017-02-15 
22:11:48.939042400 +0100
 +++ firebird/src/common/os/win32/mod_loader.cpp        2017-02-15 
22:12:30.062262700 +0100
-@@ -103,6 +103,8 @@
+@@ -103,6 +103,10 @@
                                        "msvcr120.dll",
  #elif _MSC_VER == 1900
                                        "vcruntime140.dll",
 +#elif _MSC_VER == 1910
++                                      "vcruntime140.dll",
++#elif _MSC_VER == 1911
 +                                      "vcruntime140.dll",
  #else
                      #error Specify CRT DLL name here !
commit 91f7d4c376c3b7e45be5a4bb1a23c7521421ac6e
Author:     Michael Stahl <mst...@redhat.com>
AuthorDate: Thu Sep 7 13:26:44 2017 +0200
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Mon Nov 13 11:21:29 2023 +0000

    configure: find MSVC 2017 MSMs & DLLs again
    
    They're still called "VC150" in my installation.
    
    Change-Id: I0a005236ff5edc758be41616e33b254577144f17

diff --git a/configure.ac b/configure.ac
index ebf59874c472..d46123ac0fcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5240,19 +5240,21 @@ find_winsdk()
 
 find_msms()
 {
-    my_msm_file=Microsoft_VC${VCVER}_CRT_x86.msm
+    my_msm_files=Microsoft_VC${VCVER}_CRT_x86.msm
     if test $VCVER = 150; then
-        my_msm_file=Microsoft_VC141_CRT_x86.msm
+        my_msm_files="Microsoft_VC141_CRT_x86.msm ${my_msm_files}"
     fi
-    AC_MSG_CHECKING([for $my_msm_file])
+    AC_MSG_CHECKING([for ${my_msm_files}])
     msmdir=
     for ver in 14.0 15.0; do
         reg_get_value_32 
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VS/MSMDir
         if test -n "$regvalue"; then
-            if test -e "$regvalue/$my_msm_file"; then
-                msmdir=$regvalue
-                break
-            fi
+            for f in ${my_msm_files}; do
+                if test -e "$regvalue/${f}"; then
+                    msmdir=$regvalue
+                    break
+                fi
+            done
         fi
     done
     dnl Is the following fallback really necessary, or was it added in response
@@ -5266,9 +5268,11 @@ find_msms()
     dnl obtain its value from cygwin:
     if test -z "$msmdir"; then
         my_msm_dir="${COMMONPROGRAMFILES}/Merge Modules/"
-        if test -e "$my_msm_dir/$my_msm_file"; then
-            msmdir=$my_msm_dir
-        fi
+        for f in ${my_msm_files}; do
+            if test -e "$my_msm_dir/${f}"; then
+                msmdir=$my_msm_dir
+            fi
+        done
     fi
 
     dnl Starting from MSVC 15.0, merge modules are located in different 
directory
@@ -5276,10 +5280,12 @@ find_msms()
         for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
             AC_MSG_CHECKING([for $VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules])
             my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
-            if test -e "$my_msm_dir/$my_msm_file"; then
-                msmdir=$my_msm_dir
-                break
-            fi
+            for f in ${my_msm_files}; do
+                if test -e "$my_msm_dir/${f}"; then
+                    msmdir=$my_msm_dir
+                    break
+                fi
+            done
         done
     fi
 
@@ -5291,7 +5297,7 @@ find_msms()
             AC_MSG_ERROR([not found])
         else
             AC_MSG_WARN([not found])
-            add_warning "MSM $my_msm_file not found"
+            add_warning "MSM none of ${my_msm_files} found"
         fi
     fi
 }
@@ -5306,6 +5312,10 @@ find_msvc_x64_dlls()
                 
msvcdllpath="$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC141.CRT"
                 break
             fi
+            if test -d 
"$VC_PRODUCT_DIR/redist/MSVC/$l/onecore/x64/Microsoft.VC150.CRT"; then
+                
msvcdllpath="$VC_PRODUCT_DIR/redist/MSVC/$l/onecore/x64/Microsoft.VC150.CRT"
+                break
+            fi
         done
     fi
     # 
http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx
commit e127de3d9c50eab8ccc85ac85d81e3bc2db88a85
Author:     David Ostrovsky <da...@ostrovsky.org>
AuthorDate: Tue Sep 5 08:55:25 2017 +0200
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Mon Nov 13 11:21:18 2023 +0000

    MSVC 15.0: Fix configure to work with update 15.3
    
    Update 15.3 renamed redist directory from 150 to 141 and introduced
    intermediate build number directories, that are different from the
    compiler build number directories.
    
    While the compiler is located under:
    
      [...]/MSVC/14.11.25503/bin/HostX64/x64/cl.exe
    
    the merge modules are located now under:
    
      VC/redist/MSVC/14.11.25325/MergeModules
    
    Change the hard coded detection approach, to the dynamic one: list
    all directories in suspected locations and check for existnace of
    the artifacts we are looking for.
    
    Change-Id: Ie040f290d1748ab4ec5c715b6636cc3733329e1c
    Reviewed-on: https://gerrit.libreoffice.org/41922
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/configure.ac b/configure.ac
index dfd79d97a9e5..ebf59874c472 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5241,6 +5241,9 @@ find_winsdk()
 find_msms()
 {
     my_msm_file=Microsoft_VC${VCVER}_CRT_x86.msm
+    if test $VCVER = 150; then
+        my_msm_file=Microsoft_VC141_CRT_x86.msm
+    fi
     AC_MSG_CHECKING([for $my_msm_file])
     msmdir=
     for ver in 14.0 15.0; do
@@ -5270,16 +5273,14 @@ find_msms()
 
     dnl Starting from MSVC 15.0, merge modules are located in different 
directory
     if test $VCVER = 150; then
-        my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$vcbuildnumber/MergeModules/"
-        if test -e "$my_msm_dir/$my_msm_file"; then
-            msmdir=$my_msm_dir
-        else
-            # got everything in 14.10.15017 except the MSMS in 25008... huh?
-            my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/14.10.25008/MergeModules/"
+        for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
+            AC_MSG_CHECKING([for $VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules])
+            my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
             if test -e "$my_msm_dir/$my_msm_file"; then
                 msmdir=$my_msm_dir
+                break
             fi
-        fi
+        done
     fi
 
     if test -n "$msmdir"; then
@@ -5299,11 +5300,13 @@ find_msvc_x64_dlls()
 {
     msvcdllpath="$VC_PRODUCT_DIR/redist/x64/Microsoft.VC${VCVER}.CRT"
     if test "$VCVER" = 150; then
-        if test $vcbuildnumber = 14.10.25017; then
-            
msvcdllpath="$VC_PRODUCT_DIR/redist/MSVC/$vcbuildnumber/onecore/x64/Microsoft.VC${VCVER}.CRT"
-        else
-            
msvcdllpath="$VC_PRODUCT_DIR/redist/MSVC/$vcbuildnumber/x64/Microsoft.VC${VCVER}.CRT"
-        fi
+        for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
+            AC_MSG_CHECKING([for 
$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC141.CRT])
+            if test -d 
"$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC141.CRT"; then
+                
msvcdllpath="$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC141.CRT"
+                break
+            fi
+        done
     fi
     # 
http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx
     # Refactored C Runtime (CRT): This CTP contains the first preview of the 
substantially refactored CRT.

Reply via email to