From 2e47324860bcbcc7b317efa66673201877583b3e Mon Sep 17 00:00:00 2001
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: Wed, 25 Sep 2024 13:52:58 +0300
Subject: apps: Replace HAVE_DNG with HAVE_TIFF

Support for DNG capture is conditioned by the availability of libtiff,
which is indicated by the HAVE_TIFF macro set by meson. The dng_writer.h
header then defines HAVE_DNG, which is used in a couple of places to
conditionally compile DNG-related code. Most of the other locations
where conditional compilation is required use HAVE_TIFF.

Using both HAVE_TIFF and HAVE_DNG is confusing. HAVE_DNG would be a
better name, but as the macro is defined in dng_writer.h, it would
require all files that need to test for DNG support to include that
header. Failure to include it (directly or indirectly) would result in
the code covered by the macro to be silently disabled.

To avoid the confusion, standardize on using HAVE_TIFF everywhere and
drop HAVE_DNG.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
 src/apps/common/dng_writer.h | 1 -
 1 file changed, 1 deletion(-)

(limited to 'src/apps/common')

diff --git a/src/apps/common/dng_writer.h b/src/apps/common/dng_writer.h
index 917713e6..aaa8a852 100644
--- a/src/apps/common/dng_writer.h
+++ b/src/apps/common/dng_writer.h
@@ -8,7 +8,6 @@
 #pragma once
 
 #ifdef HAVE_TIFF
-#define HAVE_DNG
 
 #include <libcamera/camera.h>
 #include <libcamera/controls.h>
-- 
cgit v1.2.1