[libvirt] [PATCH] Avoid searching for windres when not building for cygwin or mingw.

Diego Elio Pettenò flameeyes at gmail.com
Wed Feb 24 15:44:24 UTC 2010


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.

Check the host string before deciding whether to look for windres or not.
---
 configure.ac |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 117cb20..2e12f2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1682,8 +1682,16 @@ AC_SUBST([CYGWIN_EXTRA_PYTHON_LIBADD])
 AC_SUBST([MINGW_EXTRA_LDFLAGS])
 
 dnl Look for windres to build a Windows icon resource.
-AC_CHECK_TOOL([WINDRES], [windres], [no])
-AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != "no"])
+case "$host" in
+  *cygwin* | *mingw* )
+    AC_CHECK_TOOL([WINDRES], [windres], [])
+    ;;
+  *)
+    WINDRES=""
+    ;;
+esac
+
+AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != ""])
 
 
 
-- 
1.7.0




More information about the libvir-list mailing list