]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Avoid searching for windres when not building for Windows
authorDiego Elio Pettenò <flameeyes@gmail.com>
Thu, 8 Apr 2010 09:52:46 +0000 (11:52 +0200)
committerDaniel Veillard <veillard@redhat.com>
Thu, 8 Apr 2010 09:52:46 +0000 (11:52 +0200)
Just checking for a windres tool might hit even on Linux systems when
building for Linux (e.g.: when using Gentoo and having built binutils
with multitarget support), and will then fail to link properly at the
end of the build.

* configure.ac: Avoid searching for windres on non windows target

configure.ac

index dd1298f1783b8e1069de50d16a7b7c57e16f7933..2faab9e107aa1e485dfa27af82ff6d6156ca9e31 100644 (file)
@@ -1816,10 +1816,14 @@ AC_SUBST([CYGWIN_EXTRA_PYTHON_LIBADD])
 AC_SUBST([MINGW_EXTRA_LDFLAGS])
 AC_SUBST([WIN32_EXTRA_CFLAGS])
 
-dnl Look for windres to build a Windows icon resource.
-AC_CHECK_TOOL([WINDRES], [windres], [no])
-AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != "no"])
 
+dnl Look for windres to build a Windows icon resource.
+case "$host" in
+  *-*-mingw* | *-*-cygwin* | *-*-msvc* )
+    AC_CHECK_TOOL([WINDRES], [windres], [])
+    ;;
+esac
+AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != ""])
 
 
 dnl Driver-Modules library