[FFmpeg-devel] [PATCH]Allow libspeex detection also without pkg-config

Nicolas George george at nsup.org
Thu Jan 1 01:45:02 CET 2015


Le primidi 11 nivôse, an CCXXIII, Reimar Döffinger a écrit :
<snip>
> That might sound minor, but I consider that more than worth a few extra
> lines of configure code.

This is definitely worth a few extra lines of code, but I believe the best
place to put them is not configure.

Do we agree that (1) we are talking about users who know exactly the options
they want the build system to use for a particular library and (2) this can
be achieved with a configure that uses pkg-config exclusively by controlling
pkg-config's output carefully enough?

If so, I believe the only issue is to find the way of achieving (2) with the
least effort possible. I can imagine several ways of doing it, but I do not
guess which one people will find more seducing. They revolve around two
basic options: either make helpers to produce the wanted .pc files or use a
wrapper to short-circuit pkg-config.

The second option could look like a shell script in that does
something of the sort:

    libs () {
      LIBS="$LIBS $*"
    }
    ...
    case "$lib" in
      x264) libs -L/tmp/x264/build -lx264;;
      ...

I can see several means to specify the options: edit the script, or edit a
helper script, or put it in the environment:

    export LIBS_x264="-L/tmp/x264/build -lx264"

The first option, helpers to write and manage .pc files, is less versatile
but IMHO cleaner. It would be easy, for example, to write a script (and,
probably, a function or alias in the interactive shell, to be able to
manipulate the environment) that can, for example, do that:

    pkg-config-tool --for-build-tree /tmp/x264/build

and automatically creates x264.pc in a local temporary directory.

Note that either of these options has the merit, over hacks in configure, of
allowing further automated help (like setting LD_LIBRARY_PATH or adding a
-Wl,-rpath for each -L) and of being helpful even when toying with other
projects than FFmpeg.

I volunteer to write / help write this kind of helper script, but I can not
do so unless people who want them explain clearly how they would like them
to work.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150101/6022d806/attachment.asc>


More information about the ffmpeg-devel mailing list