diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2012-05-25 22:03:06 +0200 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2012-05-25 22:19:43 +0200 |
commit | d2936622ab3eb782c56364988d1ea63b3448ea49 (patch) | |
tree | b003b284391b67d004838c31d28b16d051163fb7 | |
parent | b1dd5418233a4c00aed20150ec0e75885322b202 (diff) | |
download | libraw1394-d2936622ab3eb782c56364988d1ea63b3448ea49.tar.gz |
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>
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | src/Makefile.am | 11 | ||||
-rw-r--r-- | src/firewire-cdev.h | 1 | ||||
-rw-r--r-- | 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=<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> 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 <linux/ioctl.h> #include <linux/types.h> -#include <linux/firewire-constants.h> /* available since kernel version 2.6.22 */ #define FW_CDEV_EVENT_BUS_RESET 0x00 @@ -14,7 +14,9 @@ #include <stdlib.h> #include <byteswap.h> -#include <linux/firewire-cdev.h> + +#include "firewire-constants.h" +#include "firewire-cdev.h" #include "raw1394.h" #include "csr.h" #include "config.h" |