Mail Archives: cygwin-announce/2003/09/02/00:42:00
The xpm-nox package contains the DLL, static library, and import library
for the X-less version of the Xpm library. This release ALSO contains
the X-based DLL, cygXpm-X4.dll, so that older executables will continue
to operate correctly (*). Newly compiled programs will use the "real"
libXpm.dll from the cygwin-xfree project, or the X-less cygXpm-noX4.
dll, depending on compile-time settings (see below).
This release is built against the cygiwn-1.5.x kernel; it will not work
with 1.3.22.
CHANGES:
- documentation moved to /usr/share/*
- recompiled against cygwin-1.5.2
- add sxpm back to the distribution. It won't work without XFree86
installed and an xserver running -- but we do NOT list XFree86 as
a dependency (that would defeat the whole purpose of this package,
after all).
As concerns the X-less Xpm library, the header files are located in
/usr/include/noX/, and the import/static libs are now located in
/usr/lib/noX/.
This means that in order to link against the non-X-based Xpm libraries,
you must
a) compile using '-I/usr/include/noX'
b) compile with the '-DXPM_NO_X' flag
c) link using '-L/usr/lib/noX'
In some cases, for instance 'configure'-based packages, you have to
do it this way:
CFLAGS="-I/usr/include/noX -DXPM_NO_X" LDFLAGS=-L/usr/lib/noX
./configure
For more information about the new xpm-nox package see the NOTES
section below and /usr/share/doc/Cygwin/xpm-nox-4.2.0.README.
(*) probably pointless, as this new cygXpm-X4.dll is built against
cygwin-1.5.2 -- which means that to use it, you must recompile against
the new kernel anyway. But once you do that, you'll link against the
cygwin-xfree version of the xpm dll, and you won't need cygXpm-X4
anymore. But whatever...
--
Charles Wilson
xpm-nox volunteer maintainer for cygwin
To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page. This downloads setup.exe to your
system. Then, run setup and answer all of the questions.
*** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***
If you want to unsubscribe from 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 DOT com AT cygwin DOT com
If you need more information on unsubscribing, start reading here:
http://sources.redhat.com/lists.html#unsubscribe-simple
Please read *all* of the information on unsubscribing that is available
starting at the above URL.
------------------------------------------
NOTES:
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 Xpm routines
without depending on other X libraries and doesn't require an Xserver.
Also, this version can be linked statically OR dynamically.
o Comparison: the cygwin-xfree version and the xpm-nox version:
cygwin-xfree : + more complete - requires Xserver
xpm-nox : + 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 xpm-nox library
-- and it works fine with cygwin-XEmacs; however, since it isn't
fully complete:
o Based on the xpm code from the XFree86-4.2.0 distribution (xpm was
*finally* absorbed into the main XFree distro as of v4.0). However,
there a few non- cosmetic differences between the earlier
"xpm-3.4k.tar.gz" distribution and the "xpm" directory in the
XFree86-4.2.0 sources.
o follows new naming scheme for dlls (with some complications because
of the need NOT to interfere with the cygwin-xfree version):
- /usr/lib/noX/libXpm.dll.a (import lib, X11-free)
- /usr/lib/noX/libXpm-noX.a (static lib, X11-free)
- /usr/bin/cygXpm-noX4.dll (dll, X11-free)
- /usr/include/noX/xpm.h, simx.h
(specially-hacked versions of the xpm header files)
- cygwin-specific docs in /usr/doc/Cygwin/xpm-nox-4.2.0.README
- generic docs in /usr/doc/xpm-nox-4.2.0/*
So ordinarily, configure-based clients will find the cygwin-xfree
versions of the header files and libraries: xpm-nox "hides" itself in
a /noX/ subdirectory to avoid conflicts. To use the xpm-nox headers
and libraries, you must
a) use -I/usr/include/noX when compiling
b) define -DXPM_NO_X when compiling (or "FOR_MSW")
c) use -L/usr/lib/noX when linking
For configure-based clients, this may require
export CFLAGS="-I/usr/include/noX -DXPM_NO_X"
export LDFLAGS=-L/usr/lib/noX
./configure
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.x.y 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 If you are building a package that depends on xpm, and you want to
use the cygwin-xfree version, you don't need to do anything special.
Just use ./ configure as normal, or explicitly put /usr/X11R6/include
and /usr/X11R6/lib in your header/lib search paths. No special
defines are needed; your app will be dynamically linked to the
cygwin-xfree libXpm dll. You can't link statically; the cygwin xfree
project doesn't provide static libraries.
o Now, if you are building a package that depends on xpm, and you
wish to link to the xpm-nox version, AND you wish to link
*dynamically*, then just define -DXPM_NO_X and use -I/usr/include/noX
when compiling. Link using 'gcc -L/usr/lib/noX'. For more
information, see /usr/doc/Cygwin/xpm-nox-4.2.0.README.
o If you are building a package that depends on xpm, and you wish to
link to the xpm-nox version, AND you wish to link *statically*,
compile as instructed above, but link using
'gcc -static -L/usr/lib/noX'. For more information, see
/usr/doc/Cygwin/xpm-nox-4.2.0.README.
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-nox 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" makefile does NOT mean "this-makefile-builds-an-X11free-library".)
Anyway, 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.
- Raw text -