libgphoto2 photo camera library (libgphoto2) Internals  2.5.26
gphoto2-version.c
Go to the documentation of this file.
1 
24 #include "config.h"
25 
26 #include <stdlib.h>
27 
29 
31 {
32  /* we could also compute/parse the short strings from the long
33  ones, but the current method is easier for now :-) */
34  static const char *shrt[] =
35  {
36  PACKAGE_VERSION,
37 #if GP_CAMLIB_SET_IS_NONSTANDARD
38  "NON-STANDARD CAMLIB SET"
39  " ("
40  GP_CAMLIB_SET
41 #ifdef GP_CAMLIB_SET_SKIPPING
42  " SKIPPING "
43  GP_CAMLIB_SET_SKIPPING
44 #endif
45  ")",
46 #else
47  "standard camlibs"
48 #ifdef GP_CAMLIB_SET_SKIPPING
49  " (SKIPPING "
50  GP_CAMLIB_SET_SKIPPING
51  ")"
52 #endif
53  ,
54 #endif
55 #ifdef HAVE_CC
56  HAVE_CC,
57 #else
58  "unknown cc",
59 #endif
60 #ifdef HAVE_LTDL
61  "ltdl",
62 #else
63  "no ltdl",
64 #endif
65 #ifdef HAVE_LIBEXIF
66  "EXIF",
67 #else
68  "no EXIF",
69 #endif
70  NULL
71  };
72  static const char *verb[] =
73  {
74  PACKAGE_VERSION,
75 #if GP_CAMLIB_SET_IS_NONSTANDARD
76  "NON-STANDARD CAMLIB SET"
77 #ifdef GP_CAMLIB_SET_SKIPPING
78  " SKIPPING SOME"
79 #endif
80  " ("
81  GP_CAMLIB_SET
82 #ifdef GP_CAMLIB_SET_SKIPPING
83  " SKIPPING "
84  GP_CAMLIB_SET_SKIPPING
85 #endif
86  ")",
87 #else
88  "standard camlib set"
89 #ifdef GP_CAMLIB_SET_SKIPPING
90  " SKIPPING SOME"
91 #endif
92  " ("
93  GP_CAMLIB_SET
94 #ifdef GP_CAMLIB_SET_SKIPPING
95  " SKIPPING "
96  GP_CAMLIB_SET_SKIPPING
97 #endif
98  ")",
99 #endif
100 #ifdef HAVE_CC
101  HAVE_CC " (C compiler used)",
102 #else
103  "unknown (C compiler used)",
104 #endif
105 #ifdef HAVE_LTDL
106  "ltdl (for portable loading of camlibs)",
107 #else
108  "no ltdl (for portable loading of camlibs)",
109 #endif
110 #ifdef HAVE_LIBEXIF
111  "EXIF (for special handling of EXIF files)",
112 #else
113  "no EXIF (for special handling of EXIF files)",
114 #endif
115  NULL
116  };
117  return((verbose == GP_VERSION_VERBOSE)?verb:shrt);
118 }
119 
120 /*
121  * Local Variables:
122  * c-file-style:"linux"
123  * indent-tabs-mode:t
124  * End:
125  */
GPVersionVerbosity
@ GP_VERSION_VERBOSE
const char ** gp_library_version(GPVersionVerbosity verbose)