[Top][All Lists]

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

Re: pkg-config wisdom

From: Ben Pfaff
Subject: Re: pkg-config wisdom
Date: Fri, 23 Oct 2009 18:50:09 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

John Calcote <address@hidden> writes:

> If your project uses libxml's API, then you as the maintainer should
> be very aware of requisite dependencies of that library. The
> AC_CHECK_LIB macro accepts a fifth argument, other-libraries, which is
> a whitespace-separated list of dependent libraries (actually
> command-line options, e.g., [-lzlib -lpthread -lX11]) that are
> required by the primary library that you're checking for. Note,
> however, that if you've already tested for the presence of any of
> these 2nd and 3rd level libraries in previous AC_CHECK_LIB tests, then
> these references will already be in the LIBS variable, and thus used
> in this test automatically.

It's too bad how complicated it gets sometimes, though.  On first
reading, I thought that maybe the following quote from the GNU
libplot manual had some kind of embedded joke that I was missing:

       To link your application with GNU `libplot', you would use the
    appropriate `-l' option(s) on the command line when compiling it.  You
    would use

         -lplot -lXaw -lXmu -lXt -lXext -lX11 -lpng -lz -lm

    or, in recent releases of the X Window System,

         -lplot -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lpng -lz -lm

    These linking options assume that your version of `libplot' has been
    compiled with PNG support; if not, you would omit the `-lpng -lz'

       As an alternative to the preceding, you may need to use `-lplot -lXm
    -lXt -lXext -lX11 -lpng -lz -lm', `-lplot -lXm -lXt -lXext -lX11 -lpng
    -lz -lm -lc -lgen', or `-lplot -lXm -lXt -lXext -lX11 -lpng -lz -lm -lc
    -lPW', on systems that provide Motif widgets instead of Athena widgets.
    In recent releases of the X Window System, you would insert `-lSM
    -lICE'.  Recent releases of Motif require `-lXp' and possibly `-lXpm'
    as well.)

Ben Pfaff

reply via email to

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