From d2936622ab3eb782c56364988d1ea63b3448ea49 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Fri, 25 May 2012 22:03:06 +0200 Subject: [PATCH] Include local firewire-*.h instead of system-wide 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 --- configure.ac | 7 ------- src/Makefile.am | 11 +++-------- src/firewire-cdev.h | 1 - src/fw.h | 4 +++- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 4032cd2..55cce91 100644 --- a/configure.ac +++ b/configure.ac @@ -30,13 +30,6 @@ if test x$with_valgrind = xyes ; then AC_CHECK_HEADERS(valgrind/valgrind.h) fi -AC_ARG_WITH(fw-dir,[ --with-fw-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, [ --with-fw-device-prefix= Prefix of firewire device file names (default "fw").], [FW_DEVICE_PREFIX="\"$withval\""], [FW_DEVICE_PREFIX="\"fw\""]) diff --git a/src/Makefile.am b/src/Makefile.am index 79ee407..26deb68 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,12 +6,6 @@ lib_LTLIBRARIES = libraw1394.la 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 = \ main.c \ eventloop.c \ @@ -27,8 +21,9 @@ libraw1394_la_SOURCES = \ dispatch.c \ fw.c \ fw-iso.c \ - fw.h - + fw.h \ + firewire-cdev.h \ + firewire-constants.h # headers to be installed pkginclude_HEADERS = raw1394.h csr.h ieee1394.h diff --git a/src/firewire-cdev.h b/src/firewire-cdev.h index d500369..130bfb1 100644 --- a/src/firewire-cdev.h +++ b/src/firewire-cdev.h @@ -28,7 +28,6 @@ #include #include -#include /* available since kernel version 2.6.22 */ #define FW_CDEV_EVENT_BUS_RESET 0x00 diff --git a/src/fw.h b/src/fw.h index b17d857..c8481c2 100644 --- a/src/fw.h +++ b/src/fw.h @@ -14,7 +14,9 @@ #include #include -#include + +#include "firewire-constants.h" +#include "firewire-cdev.h" #include "raw1394.h" #include "csr.h" #include "config.h"