bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] Compile popt under Windows using gnulib


From: Richard W.M. Jones
Subject: [PATCH] Compile popt under Windows using gnulib
Date: Sat, 25 Oct 2008 15:52:03 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

This patch allows popt from CVS to be cross-compiled for Windows using
MinGW and Win32 API (not Cygwin).

It uses Gnulib to supply the missing functionality -- mainly glob(3)
and globfree(3).

Note that the patch isn't "complete".  As you can see from the
modification to autogen.sh you are expected to have a checkout of
gnulib itself in a directory adjacent to popt (../gnulib/).  That will
pull in the additional files from Gnulib.  A better explanation is
probably to read the Gnulib manual:

http://www.gnu.org/software/gnulib/manual/gnulib.html#Initial-import

All the Gnulib modules imported are LGPLv2+ (except for one which is
public domain).

If you have the MinGW cross-compiler installed, eg. from [1], then you
can compile popt for Windows by doing:

  PKG_CONFIG_PATH=/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig \
  ./autogen.sh \
    --host=i686-pc-mingw32 --prefix=/usr/i686-pc-mingw32/sys-root/mingw

  make -C lib fnmatch.h                   # BUG IN GNULIB?

  make

You'll get a DLL, and test{1,2,3}.exe which can be run under Wine (or
even on Windows :-).

For reference you can find our mingw32-popt RPM sources here:

http://hg.et.redhat.com/misc/fedora-mingw--devel/?cmd=manifest;manifest=6651a3a433544afe0cc67b0fcb5668d71d3ecfbf;path=/popt/

Rich.

[1] http://www.annexia.org/tmp/mingw/fedora-9/i386/

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

Attachment: popt-win.patch
Description: Text document


reply via email to

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