Removing useless library dependancies from xmotd
Hi,
I am trying to limit the number of libraries that xmotd links against,
as advised by the recent post to d-d-a.
The Imakefile contains:
MOTD_LIBRARIES = $(XPM_LIB) $(HTML_LIB_DIR) $(HTML_LIB) $(MOTIF_LIB_DIR) $(MOTIF_LIB)
LOCAL_LIBRARIES = $(MOTD_LIBRARIES) XawClientLibs
By experimenting, I've found out that $(XMOTD_LIBRARIES) actually
expands to an empty string, while XawClientLibs expands to:
-lXaw -lXmu -lXt -lSM -lICE -lXpm -lXext -lX11
Which makes xmotd depend on uncecessary libraries. I did some grepping
and found that (I don't know whether this is the right file, but others
contain similar definitions):
/usr/lib/X11/config/X11.tmpl:#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
So I experimented some more, and replaced the LOCAL_LIBRARIES definition
with:
LOCAL_LIBRARIES = $(MOTD_LIBRARIES) $(XAWLIB)
Which in turn makes the linker arguments expand to just:
-lXaw
That seems sufficient, as xmotd still compiles and runs fine.
Now some questions:
- is it OK for me to make this modification in my package? Won't it
break on some other (Debian) architecture?
- maybe it's a good idea in general, and Debian xorg should be modified
to expand XawClientLibs to just $(XAWLIB) ?
regards,
Marcin
--
Marcin Owsiany <porridge@debian.org> http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216
Reply to: