[ANNOUNCEMENT] New on sourceware: xpm-4.0.0-2

Charles Wilson cwilson@ece.gatech.edu
Mon Nov 20 18:56:00 GMT 2000


I've just uploaded xpm-4.0.0-2 to sourceware.  USE A MIRROR -- the ones
listed in the INSTALLATION section have been verified up-to-date with
xpm.  xpm provides the Xpm library, consisting of routines to manipulate
and display Xpm-format images.  For more information about this package
(and how it differs from the libXpm.dll provided by the cgywin-xfree
project) see the NOTES section below and
/usr/doc/Cygwin/xpm-4.0.0.README.

INSTALLATION:

To update your installation, click on the "Install Cygwin now" link on
the http://sources.redhat.com/cygwin web page.  This downloads setup.exe
to your system.

Run setup and answer all of the questions.  PLEASE, PLEASE, PLEASE
choose a mirror site for your download.  The 'sources.redhat.com' site
is badly overloaded.  The mirrors below have the latest version of this
package:

ftp://ftp.freesoftware.com/pub/sourceware/cygwin/ (US)
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/mirrors/cygnus/
(Germany)
ftp://ftp.ntua.gr/pub/pc/cygwin/ (Greece)

The setup.exe program will figure out what needs to be updated on your
system and should install the xpm package automatically. 

If you have questions or comments, please send them to the Cygwin
mailing list at:  cygwin@sources.redhat.com .  I would appreciate if you
would use this mailing list rather than emailing me directly. This
includes ideas and comments about the setup utility or Cygwin general.

If you want to make a point or ask a question the Cygwin mailing list is
the appropriate place.

              *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe to the cygwin-announce mailing list, look at
the "List-Unsubscribe: " tag in the email header of this message. Send
email to the address specified there.  It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain.com@sources.redhat.com

NOTES:

o Building the package from source requires gcc-2.95.2-2 and 
binutils-20000722-1 or later

o can coexist with the "libXpm.dll" provided by cygwin-XFree, but does
provide additional features. The cygwin-XFree version of the Xpm library
is dynamic only; this version provides the option of statically linking
the Xpm code -- although the X11 version of libXpm provided here still
requires the *other* X11 dynamic libs, so that's kind of a moot point. 
The real key is the no-X-server-required version:

o Two different builds: one that requires X11 and an Xserver (similar to
the cygwin-XFree "libXpm.dll", and one that is "X11-free".  Both builds
are provided in "static" and "dll" versions.
  X11 build     : + more complete		- requires Xserver
  X11-free build: + no Xserver needed	- a few missing routines (*)
The missing routines are the ones related to "Pixmaps" ("XpmImage"
"Buffer" "Image" and "Data" related functions are implemented).  I've
never run into a program that fails to link using the X11-free library
-- and it works fine with cygwin-XEmacs; however, since it isn't fully
complete:

o the X11 version is configured so that it is used by default when
linking external apps (see the symlinks below).  However, if you prefer
to always use the X11-free version, just rearrange the symlinks.

o Based on the xpm code from the XFree86-4.0.0 distribution (xpm was
*finally* absorbed into the main XFree distro as of v4.0).  However,
there is no substantial difference between the earlier "xpm-3.4k.tar.gz"
distribution and the "xpm" directory in the XFree86-4.0.0 sources.

o follows new naming scheme for dlls (with some complications because
there are two different versions):
  - /usr/lib/libXpm-X.dll.a    (import lib, Xserver needed)
  - /usr/lib/libXpm-X.a        (static lib, Xserver needed)
  - /usr/lib/libXpm-noX.dll.a  (import lib, X11-free)
  - /usr/lib/libXpm-noX.a      (static lib, X11-free)
  - /usr/lib/libXpm.dll.a -> libXpm-X.dll.a
  - /usr/lib/libXpm.a     -> libXpm-X.a
  - /usr/bin/cygXpm-X4.dll     (dll, Xserver needed)
  - /usr/bin/cygXpm-noX4.dll   (dll, X11-free)
  - cygwin-specific docs in /usr/doc/Cygwin/xpm-4.0.0.README
  - generic docs in /usr/doc/xpm-4.0.0/*

So, -lXpm will get the Xserver-required version (unless you change the
symbolic links before linking your app). Also, you can explicitly use
'-lXpm-X' and '-lXpm-noX'.  To link with the X11-free version, you MUST
defined -DXPM_NO_X when compiling your code.  See
/usr/doc/Cygwin/xpm-4.0.0.README.

o The dll's are versioned as "4", not "3" -- but this is NOT because the
sources came from XFree86- ***4*** .0.0.  According to xpm.h, the
library version number, which remains "3.4k" even in the XFree86-4.0.0
sources, should be parsed as follows:
   XpmFormat "3"
   XpmVersion "4"
   XpmRevision "11" ( "k" is the 11th letter of the alphabet )
Quoting: "we forget the 3 which is the format number" so the SO version
is 4.11 (which I simplified down to just SOMAJOR = 4 ).

o A cygwin-specific README and PATCH are stored in the source archive,
under <top>/CYGWIN-PATCHES/* (although that patch has already been
applied to the archive itself). The cygwin-specific README is also
installed by the binary distribution as described above.

o If you are building a package that depends on xpm, and you wish to
link *statically*, define -DXPM_STATIC to get the 'correct' #define's
in Xpm.h when compiling the .o files in your package. Also, use 'gcc
-static' when linking your package. Also, be sure that /usr/include
precedes /usr/X11R6/include in the header search path (explicit
-I/usr/include) and that /usr/lib precedes /usr/X11R6/lib in the library
search path (explicit -L/usr/lib).

o No special -Ddefine options or link options are needed when building a
package that depends on xpm and you want to link dynamically
(recommended). (However, if you want to use the X11-free version, you DO
have to define -DXPM_NO_X when compiling and you may need to take
special steps when linking.  See /usr/doc/Cygwin/xpm-4.0.0.README)

o Thus, there are two flags you may define, which affect how your
programs will build and link: -DXPM_STATIC and -DXPM_NO_X.  Note that
the XPM_NO_X flag is synonymous with the FOR_MSW flag in the original
xpm-3.4k source code, and -Ddefining either one will work.

o Proactive answer to the obvious question: "Why don't you merge this
into the cygwin-XFree86 distribution?"  Answer: Not easy, and probably
not a good idea.  The cygwin-XFree86 builds using standard "xmkmf"
X11-style configuration and builds.  This generates makefiles for
building the "X11 world".  Then you do "make world" and build
everything.  It's just not part of the mindset to hack up xmkmf so that
"if building on cygwin, when generating the makefiles for the xpm target
(but not the other targets), do the X thing, but also cheat a bit over
here and generate this extra library that is not part of the X world,
etc etc".  It really is easier, on cygwin, to pull xpm out and build it
separately.

The X11free code (not my special Makefile changes) is actually part of
the official xpm-3.4k distro, which was absorbed en mass into XFree86. 
However, the inclusion of the X11free stuff was probably an accidental
oversight on the part of the XFree86 folks, or they just included it
because there was no better place to put it so that it doesn't get lost;
now that libXpm has been absorbed by XFree86, the "old" separate xpm-3.4
distro will probably fade into obscurity.

You're not supposed to actually *USE* the X11free code when building X11
-- that's why the official Makefiles, even the so-called "-noX"
makefiles, don't activate the X11free code.  (Yes, it's confusing.  In
the X11 world, a "-noX" makefile is a makefile that builds X11-based
code, but does not rely on a working xmkmf program; a "-noX" makefiles
does NOT mean "this-makefile-builds-an-X11free-library".)  Anway, the
X11free code is *only* provided in the official xpm-3.4k distro (and
now, in the XFree86 distro) in case you (a) want libXpm on windows, and
(b) don't want X11.  

Cygwin kinda straddles the fence, so libXpm straddles the fence too --
these sources and the official XFree86-xpm/xpm-3.4k sources are
synchronized aside from Makefile issues, but my version *can* build a
no-X library "out-of-box"; the cygwin-XFree86 version can't and IMO
shouldn't.

whew.

--Chuck Wilson


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list