diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2020-01-13 01:02:59 +0100 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2020-01-20 06:24:53 +0100 |
commit | 6c073146f461f29904b9f874cd718a0276efe7f3 (patch) | |
tree | 4c885d5a28508f1e1072e3935b588f2de0bdaa8a | |
parent | de98b151bce6b0aa70157d6c0ebb7f59b4da3792 (diff) | |
download | libgphoto2-6c073146f461f29904b9f874cd718a0276efe7f3.tar.gz |
Make GP_CAMLIB(lumix) conditional instead of lumix.c code
Make GP_CAMLIB(lumix) macro invocation conditional instead
of the C code inside of the lumix camlib.
If either libcurl or libxml2 are missing, this will result
in compilation of lumix.c failing, as the macros GP_CAMLIB
and GP_CAMLIBS_DEFINE still need to be fixed to prevent the
lumix camlib from being built in that case (issue #467).
-rw-r--r-- | camlibs/lumix/lumix.c | 28 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 7 insertions, 23 deletions
diff --git a/camlibs/lumix/lumix.c b/camlibs/lumix/lumix.c index 3115b0648..5cb8ee450 100644 --- a/camlibs/lumix/lumix.c +++ b/camlibs/lumix/lumix.c @@ -27,17 +27,13 @@ #include <string.h> #include <errno.h> -#ifdef HAVE_LIBCURL -# include <curl/curl.h> -#endif +#include <curl/curl.h> #include <stdio.h> #include <stdlib.h> -#ifdef HAVE_LIBXML2 -# include <libxml/parser.h> -# include <libxml/tree.h> -# include <libxml/xmlmemory.h> -# include <libxml/xmlreader.h> -#endif +#include <libxml/parser.h> +#include <libxml/tree.h> +#include <libxml/xmlmemory.h> +#include <libxml/xmlreader.h> #include <sys/socket.h> @@ -87,7 +83,6 @@ # define N_(String) (String) #endif -#if defined(HAVE_LIBCURL) && defined(HAVE_LIBXML2) char* CDS_Control = ":60606/Server0/CDS_control"; int ReadoutMode = 2; // this should be picked up from the settings.... 0-> JPG; 1->RAW; 2 -> Thumbnails @@ -1919,19 +1914,6 @@ camera_init (Camera *camera, GPContext *context) return GP_ERROR_IO; } -#else -/* no XML2 or no CURL -> no camera here */ -int -camera_init (Camera *camera, GPContext *context) -{ - return GP_OK; -} - -int camera_abilities (CameraAbilitiesList *list) -{ - return GP_OK; -} -#endif int camera_id (CameraText *id) diff --git a/configure.ac b/configure.ac index eb1ebd81a..c9ae2fc42 100644 --- a/configure.ac +++ b/configure.ac @@ -513,7 +513,9 @@ GP_CAMLIB([konica],[outdated])dnl GP_CAMLIB([konica_qm150],[outdated])dnl GP_CAMLIB([largan],[outdated])dnl GP_CAMLIB([lg_gsm],[outdated])dnl +AM_COND_IF([BUILD_LUMIX], [dnl GP_CAMLIB([lumix])dnl +]) GP_CAMLIB([mars])dnl GP_CAMLIB([dimagev])dnl GP_CAMLIB([mustek],[outdated])dnl |