[GRASS5] Re: GRASS and configure

Glynn Clements glynn at gclements.plus.com
Sat Nov 19 05:16:26 EST 2005


> I have mostly got the FFMPEG configure stuff working. The problem is 
> that ffmpeg consists of 3 libraries (avcodec, avutil and avformat). The 
> avcodec library is the one that I need and have set up for in configure. 
> Unfortunately, depending on the system avcodec requires avutil.

Let me guess; you're making the NVIZ animation feature generate video
files directly?

If so: while I can understand that it might be more convenient, there
are two problems.

1. It creates yet more reasons why NVIZ may fail to compile. NVIZ is
already the hardest part of GRASS to build due to Tcl/Tk and OpenGL
issues, and video encoding libraries are several orders of magnitude
more complex than either Tcl/Tk or OpenGL (and usually in a permanent
"beta" state).

2. The number of parameters which can control exactly how a sequence
of images is turned into an AVI (or similar) file is immense, and
varies from one build of ffmpeg to another. These kinds of issues are
arguably best left to a stand-alone encoder.

If you are planning on adding ffmpeg support to NVIZ, please make it
optional. Being able to compile ffmpeg shouldn't be a mandatory
prerequisite for compiling NVIZ.

> My question is; is it possible to spcify two libraries in the 
> LOC_CHECK_LIBS() so that the output (FFMPEGLIB in my case) is defined as 
> two libraries (i.e -lavcodec and -lavutil)? Or do I have to create 
> seperate variables for each library?

You can specify that certain additional switches may be required by
passing them as the 9th and subsequent arguments, e.g.

LOC_CHECK_LIBS(avcodec,avcodec_init,AVcodec,$AVLIBPATH,AVCODECLIB,,,,-lavutil)

This will try to find avcodec_init first with just:

	... $AVLIBPATH -lavcodec

then with

	... $AVLIBPATH -lavcodec -lavutil

If the first test passes, AVCODECLIB will be set to "-lavcodec"; if
the first fails but the second passes, it will be set to
"-lavcodec -lavutil".

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list