aclocal.m4: allow override of dllwrap and windres when cross-compiling
authorSergei Trofimovich <slyfox@gentoo.org>
Tue, 23 May 2017 08:13:43 +0000 (09:13 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Tue, 23 May 2017 08:13:43 +0000 (09:13 +0100)
Commit 66108864540601837ad77847f4062a670362361f reverted ability
to override 'dllwrap' and 'windres' paths when cross-compiling.

After this change (and a few libraries/Win32 patches) I was able
to build cross-compiler to windows:

    $ ./configure --target=i686-w64-mingw32 \
        DllWrap=i686-w64-mingw32-dllwrap \
        Windres=i686-w64-mingw32-windres

Later both 'dllwrap' and 'windres' should be derived from --target=
as we do now for 'CC', 'AR', 'NM' and others.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
aclocal.m4

index 697cba5..7ad9c36 100644 (file)
@@ -479,8 +479,18 @@ AC_DEFUN([FP_SETTINGS],
         SettingsLdCommand="$LdCmd"
         SettingsArCommand="$ArCmd"
         SettingsPerlCommand="$PerlCmd"
-        SettingsDllWrapCommand="/bin/false"
-        SettingsWindresCommand="/bin/false"
+        if test -z "$DllWrap"
+        then
+            SettingsDllWrapCommand="/bin/false"
+        else
+            SettingsDllWrapCommand="$DllWrap"
+        fi
+        if test -z "$Windres"
+        then
+            SettingsWindresCommand="/bin/false"
+        else
+            SettingsWindresCommand="$Windres"
+        fi
         SettingsLibtoolCommand="libtool"
         SettingsTouchCommand='touch'
     fi