Giuseppe Sacco <giuse...@eppesuigoccas.homedns.org> (10/02/2010):
> Hi Cyril,

Hi Giuseppe,

> @@ -191,7 +191,7 @@
>  faxsend: ${FAXSENDOBJS} libfaxserver-${ABI_VERSION}.a ${LIBS}
>       ${C++F} -o $@ ${FAXSENDOBJS} ${LIBFAXSERVER} ${LDFLAGS}
>  faxgetty: ${FAXGETTYOBJS} libfaxserver-${ABI_VERSION}.a ${LIBS}
> -     ${C++F} -o $@ ${FAXGETTYOBJS} ${LIBUTIL} ${LIBFAXSERVER} ${LDFLAGS}
> +     ${C++F} -o $@ ${FAXGETTYOBJS} ${LIBFAXSERVER} ${LDFLAGS}
>  faxqclean: ${FAXQCLEANOBJS} libfaxserver-${ABI_VERSION}.a ${LIBS}
>       ${C++F} -o $@ ${FAXQCLEANOBJS} ${LIBFAXSERVER} ${LDFLAGS}
> 
> This patch was meant to fix a lintian warning about faxgetty linked
> against libutil without using any of its symbols. I now understand
> that libutil is unnecessary on linux kernel, while it is mandatory
> at least in freebsd.

OK, I see. (I think that's a dpkg-dev tool which warns you about that,
rather than lintian, by the way?)

Another handy thing to only keep needed dependencies: --as-needed; but
that's usually a workaround when there's no other way out. Your case
seems simpler, and fixing it properly should be easy.

> Do you have any suggestion about how to change Makefile.in in order
> to add LIBUTIL only on these systems that really require it?

The configure step is usually used to do this kind of detection,
rather than Makefile.in: You could try and build a very basic program,
without that library; if that fails, you try building it again, this
time with the library (and if that fails again, you start shouting and
break there). You set a variable accordingly: empty in the first case,
and with the proper linker argument in the second case. In your
Makefile.in, you only have to include that variable, which will get
substituted accordingly.

Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature

Reply via email to