diff options
Diffstat (limited to 'camlibs/lumix/lumix.c')
-rw-r--r-- | camlibs/lumix/lumix.c | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/camlibs/lumix/lumix.c b/camlibs/lumix/lumix.c index eeb0a0b54..3115b0648 100644 --- a/camlibs/lumix/lumix.c +++ b/camlibs/lumix/lumix.c @@ -24,15 +24,20 @@ */ #include "config.h" + #include <string.h> #include <errno.h> -#include <curl/curl.h> +#ifdef HAVE_LIBCURL +# include <curl/curl.h> +#endif #include <stdio.h> -#include <libxml/parser.h> -#include <libxml/tree.h> #include <stdlib.h> -#include <libxml/xmlmemory.h> -#include <libxml/xmlreader.h> +#ifdef HAVE_LIBXML2 +# include <libxml/parser.h> +# include <libxml/tree.h> +# include <libxml/xmlmemory.h> +# include <libxml/xmlreader.h> +#endif #include <sys/socket.h> @@ -82,6 +87,8 @@ # 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 char* cameraShutterSpeed = "B"; // //placeholder to store the value of the shutterspeed set in camera; "B" is for bulb. @@ -370,14 +377,6 @@ storage_info_func (CameraFilesystem *fs, /**********************************************************************/ -int -camera_id (CameraText *id) -{ - strcpy(id->text, "Lumix Wifi"); - - return GP_OK; -} - static size_t write_callback(char *contents, size_t size, size_t nmemb, void *userp) { @@ -1919,3 +1918,25 @@ camera_init (Camera *camera, GPContext *context) } else 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) +{ + strcpy(id->text, "Lumix Wifi"); + + return GP_OK; +} |