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

Paolo Bonzini pbonzini at redhat.com
Wed Feb 24 15:37:35 UTC 2010


On 02/24/2010 04:22 PM, Richard W.M. Jones wrote:
> On Wed, Feb 24, 2010 at 08:11:45AM -0700, Eric Blake wrote:
>> According to Diego Elio Pettenò on 2/24/2010 8:04 AM:
>>> Check the host string before deciding whether to look for windres or not.
>>>   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], [])
>>> +    ;;
>>> +esac
>>> +
>>> +AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != ""])
>>
>> I like the idea.  However, shouldn't you also guarantee that WINDRES is
>> set even if $host is not windows-based, so that an inherited $WINDRES in a
>> Linux environment does not cause spurious triggering of the AM_CONDITIONAL?
>
> I'd argue the reverse, so users can set WINDRES in the environment
> before running configure, no?

That would try to add an icon to a Linux executable.  I don't think it's 
the right thing to do, setting WINDRES in the environment _will_ work 
with Eric's proposed change when targeting Windows.

Paolo




More information about the libvir-list mailing list