Add fallback to find gcc libs for stretch
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 2 May 2017 09:32:37 +0000 (11:32 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Tue, 2 May 2017 09:32:37 +0000 (11:32 +0200)
* m4/gpg4win.m4 (GPG4WIN_RUNTIME_LIBRARY): Add another fallback.

--
The version output changed so that we now have to cut it before.

m4/gpg4win.m4

index 930e58f..cfb51fe 100644 (file)
@@ -784,10 +784,13 @@ AC_DEFUN([GPG4WIN_RUNTIME_LIBRARY],
         changequote(,)
         gcc_major_minor=$($CC --version \
                           | awk 'NR==1 {split($NF,a,"."); print a[1] "." a[2]}')
+        gcc_major_minor_alt=$($CC --version | cut -d " " -f 3 \
+                             | awk 'NR==1 {split($NF,a,"."); print a[1] "." a[2]}')
         changequote([,])
         guesses="/usr/lib/gcc/$host/$gcc_major_minor/$1.dll
                  /usr/$host/lib/$1.dll
-                 /usr/lib/gcc/$host/${gcc_major_minor}-win32/$1.dll"
+                 /usr/lib/gcc/$host/${gcc_major_minor}-win32/$1.dll
+                 /usr/lib/gcc/$host/${gcc_major_minor_alt}-win32/$1.dll"
 
         for file in $guesses; do
             if test -r "$file"; then