Include local firewire-*.h instead of system-wide <linux/firewire-*.h>

This guarantees that all features of libraw1394 are actually built in.
Before, some features and fixes would be silently dropped if too old
system headers (typically provided by a package called linux-headers)
were present.

An alternative would be to keep using system headers but add warnings
during the ./configure stage if old headers were encountered.  But this
helps only the person who builds libraw1394 (if there is a person
involved at all), not the users who have no reliable way to determine
how the library binary was built.

Another alternative would be to change the former soft dependency on
certain linux-headers versions into a hard dependency, i.e. fail the
build in absence of too old headers.  This would add an inconvenience
in setting up the build environment though:  The system headers would
have to be updated or a private copy of linux/firewire-*.h be specified
by way of the --with-fw-dir configure switch.

Anyhow.  The libraw1394 sources now already bring a suitable copy of
the two header files.  The --with-fw-dir configure switch is no longer
useful and is removed.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
Stefan Richter 2012-05-25 22:03:06 +02:00
parent b1dd541823
commit d2936622ab
4 changed files with 6 additions and 17 deletions

View File

@ -30,13 +30,6 @@ if test x$with_valgrind = xyes ; then
AC_CHECK_HEADERS(valgrind/valgrind.h) AC_CHECK_HEADERS(valgrind/valgrind.h)
fi fi
AC_ARG_WITH(fw-dir,[ --with-fw-dir=<dir> Path to kernel firewire headers])
if ! test -z "$with_fw_dir" ; then
FW_DIR="$with_fw_dir"
AC_SUBST(FW_DIR)
fi
AM_CONDITIONAL([WITH_FW_DIR], [! test -z "$with_fw_dir"])
AC_ARG_WITH(fw-device-prefix, AC_ARG_WITH(fw-device-prefix,
[ --with-fw-device-prefix=<prefix> Prefix of firewire device file names (default "fw").], [ --with-fw-device-prefix=<prefix> Prefix of firewire device file names (default "fw").],
[FW_DEVICE_PREFIX="\"$withval\""], [FW_DEVICE_PREFIX="\"fw\""]) [FW_DEVICE_PREFIX="\"$withval\""], [FW_DEVICE_PREFIX="\"fw\""])

View File

@ -6,12 +6,6 @@ lib_LTLIBRARIES = libraw1394.la
libraw1394_la_LDFLAGS = -version-info @lt_major@:@lt_revision@:@lt_age@ libraw1394_la_LDFLAGS = -version-info @lt_major@:@lt_revision@:@lt_age@
if WITH_FW_DIR
INCLUDES = -I$(FW_DIR)
else
INCLUDES =
endif
libraw1394_la_SOURCES = \ libraw1394_la_SOURCES = \
main.c \ main.c \
eventloop.c \ eventloop.c \
@ -27,8 +21,9 @@ libraw1394_la_SOURCES = \
dispatch.c \ dispatch.c \
fw.c \ fw.c \
fw-iso.c \ fw-iso.c \
fw.h fw.h \
firewire-cdev.h \
firewire-constants.h
# headers to be installed # headers to be installed
pkginclude_HEADERS = raw1394.h csr.h ieee1394.h pkginclude_HEADERS = raw1394.h csr.h ieee1394.h

View File

@ -28,7 +28,6 @@
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/firewire-constants.h>
/* available since kernel version 2.6.22 */ /* available since kernel version 2.6.22 */
#define FW_CDEV_EVENT_BUS_RESET 0x00 #define FW_CDEV_EVENT_BUS_RESET 0x00

View File

@ -14,7 +14,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <byteswap.h> #include <byteswap.h>
#include <linux/firewire-cdev.h>
#include "firewire-constants.h"
#include "firewire-cdev.h"
#include "raw1394.h" #include "raw1394.h"
#include "csr.h" #include "csr.h"
#include "config.h" #include "config.h"