qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
Date: Wed, 27 Jul 2011 16:56:31 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jul 27, 2011 at 08:50:23AM -0700, Kenneth Salerno wrote:
> Should check first if using a mingw compiler before forcing the addition of 
> -lglib-2.0, -liconv, and -lintl to $LIBS of config-target.mak.
> 
> 
> Signed-off-by: Kenneth Salerno <address@hidden>
> --- configure.ORIG      2011-07-27 11:28:16.859375000 -0400
> +++ configure   2011-07-27 11:43:59.859375000 -0400
> @@ -1824,9 +1824,11 @@
>  # glib support probe
>  if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
>      glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> -    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> -    libs_softmmu="$glib_libs $libs_softmmu"
> -    libs_tools="$glib_libs $libs_tools"
> +    if test "$mingw32" != "yes" ; then
> +        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> +        libs_softmmu="$glib_libs $libs_softmmu"
> +        libs_tools="$glib_libs $libs_tools"
> +    fi

This doesn't feel right to me. pkg-config works for mingw32 and should
be used just as it would be on native targets. What was the problem you
actually had without this change ?

If I had to guess I'd say your pkg-config program was not configured
to prefer mingw32 data files. You need to have an env var like this set
to make it pick up mingw32 rules instead of native ones:

 export 
PKG_CONFIG_LIBDIR="/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-pc-mingw32/sys-root/mingw/share/pkgconfig"
 pkg-config

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]