[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libcvd-members] libcvd cvd/Linux/dvbuffer3.h cvd_src/Linux/dvbu...
From: |
Edward Rosten |
Subject: |
Re: [libcvd-members] libcvd cvd/Linux/dvbuffer3.h cvd_src/Linux/dvbu... |
Date: |
Mon, 14 Jul 2008 14:43:10 -0600 (MDT) |
On Mon, 14 Jul 2008, Georg Klein wrote:
The rationale behind this is that libDC1394v2 is a nice API. It's much more
sane to use that v1, and it also supports the new linux firewire stack
(juju); this combo ships out of the box with e.g. newish fedora
distributions. I'm also told that libdc1394v2 works in MacOS, and might work
in Win32 soon.
Sounds good.
Since the old DVBuffer includes the v1 headers in it, it's not easy to
retrofit without code breakage, hence the new class. This one abstracts the
libdc1394 headers away.
Unfortunately I still don't understand how autotools work, so none of this
gets built! Can anyone (Ed!) help out with this? If libdc1394 version 2 is
I don't have it installed, so can't write the specific checks. I can give
whatever help is needed.
installed, it should build dvbuffer3_dc1394v2.cc; otherwise, if v1 is
installed and dvbuffer gets built, dvbuffer3_dv1394v1.cc should be compiled
(but not ever both.)
Sure:
You need a "check for library" command like this:
CHECK_FOR_LIBRARY(png, [
AC_CHECK_HEADERS(png.h, [], [a=1])
AC_CHECK_LIB(png, png_init_io, [], [a=1])
])
The last two arguments are "action if true" and "action if false". The
action if false is to sert a to 1. If a=1 when CHECK_FOR_LIBRARY finishes,
then it assumes that the test has failed. Basically, you need to choose a
header to chech for, and a symbol in the .so to check for. In the latter
case, you can choose "main", since this will simply check if you *can*
link against the .so/
In this case there will be two checks, checking for v2, and for v1:
Something like:
CHECK_FOR_LIBRARY(libdc1394v2, ... )
CHECK_FOR_LIBRARY(libdc1394v1, ... )
Then, you need to dig in to the dependency resolution list, which will
determine what gets built, starting on line 841.
On the line 875:
#General OS specific bits
cvd_src/Linux/dvbuffer
dvbuffer END
This has the object file (minus the .o), along with the dependencies. The
new one would look something like this:
cvd_src/Linux/dvbuffer3_dc1394v2 libdc1394v2
cvd_src/Linux/dvbuffer3_dc1394v1 libdc1394v1 END
The uppermost option satisfying the dependencies will be compiled. So this
would use v2 if available, and v1 otherwise.
-Ed