From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm6TQ-0008Mx-Nk for qemu-devel@nongnu.org; Wed, 27 Jul 2011 11:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm6TN-0002Yk-NW for qemu-devel@nongnu.org; Wed, 27 Jul 2011 11:56:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm6TN-0002YP-A0 for qemu-devel@nongnu.org; Wed, 27 Jul 2011 11:56:37 -0400 Date: Wed, 27 Jul 2011 16:56:31 +0100 From: "Daniel P. Berrange" Message-ID: <20110727155631.GK7308@redhat.com> References: <1311781823.44875.YahooMailClassic@web110409.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1311781823.44875.YahooMailClassic@web110409.mail.gq1.yahoo.com> Subject: Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc. Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kenneth Salerno Cc: qemu-devel@nongnu.org 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 > --- 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 :|