libgphoto2 photo camera library (libgphoto2) Internals  2.5.26
gphoto2-port-version.c
Go to the documentation of this file.
1 
21 #include "config.h"
22 #include <stdlib.h>
23 
25 
27 {
28  /* we could also compute/parse the short strings from the long
29  ones, but the current method is easier for now :-) */
30  static const char *shrt[] =
31  {
32  PACKAGE_VERSION,
33  "iolibs: " IOLIB_LIST,
34 #ifdef HAVE_CC
35  HAVE_CC,
36 #else
37  "unknown cc",
38 #endif
39 #ifdef HAVE_LTDL
40  "ltdl",
41 #else
42  "no ltdl",
43 #endif
44 #ifdef HAVE_LIBEXIF
45  "EXIF",
46 #else
47  "no EXIF",
48 #endif
49 #if defined(HAVE_LIBUSB) || defined(HAVE_LIBUSB1) || defined(HAVE_LIBUSB_WIN32)
50  "USB",
51 #else
52  "no USB",
53 #endif
54 #ifdef HAVE_SERIAL
55  "serial "
56 
57 #ifdef HAVE_RESMGR
58  "resmgr locking",
59 #elif HAVE_TTYLOCK
60  "ttylock locking",
61 #elif HAVE_LOCKDEV
62  "lockdev locking",
63 #else
64  "without locking",
65 #endif
66 
67 #else
68  "no serial",
69 #endif
70  NULL
71  };
72  static const char *verb[] =
73  {
74  PACKAGE_VERSION,
75  "iolibs: " IOLIB_LIST,
76 #ifdef HAVE_CC
77  HAVE_CC " (C compiler used)",
78 #else
79  "unknown (C compiler used)",
80 #endif
81 #ifdef HAVE_LTDL
82  "ltdl (for portable loading of iolibs)",
83 #else
84  "no ltdl (for portable loading of iolibs)",
85 #endif
86 #ifdef HAVE_LIBEXIF
87  "EXIF (for vusb)",
88 #else
89  "no EXIF (for vusb)",
90 #endif
91 #ifdef HAVE_LIBUSB_WIN32
92  "USB (libusb-win32, for USB cameras)",
93 #elif defined(HAVE_LIBUSB1)
94  "USB (libusb1, for USB cameras)",
95 #elif defined(HAVE_LIBUSB)
96  "USB (libusb0, for USB cameras)",
97 #else
98  "no USB (for USB cameras)",
99 #endif
100 #ifdef HAVE_SERIAL
101  "serial (for serial cameras)",
102 #else
103  "no serial (for serial cameras)",
104 #endif
105 #ifdef HAVE_RESMGR
106  "resmgr (serial port access and locking)",
107 #else
108  "no resmgr (serial port access and locking)",
109 #endif
110 #ifdef HAVE_TTYLOCK
111  "ttylock (serial port locking)",
112 #else
113  "no ttylock (serial port locking)",
114 #endif
115 #ifdef HAVE_LOCKDEV
116  "lockdev (serial port locking)",
117 #else
118  "no lockdev (serial port locking)",
119 #endif
120  NULL
121  };
122  return((verbose == GP_VERSION_VERBOSE)?verb:shrt);
123 }
124 
125 /*
126 static void foobar() {
127  GPVersionFunc gp_port_lib_ver_func = NULL;
128  gp_port_lib_ver_func = gp_port_library_version;
129  gp_port_lib_ver_func(GP_VERSION_VERBOSE);
130 }
131 */
132 
133 /*
134  * Local Variables:
135  * c-file-style:"linux"
136  * indent-tabs-mode:t
137  * End:
138  */
const char ** gp_port_library_version(GPVersionVerbosity verbose)
GPVersionVerbosity
@ GP_VERSION_VERBOSE