1 /** \file
2 *
3 * \author Copyright 2002 Hans Ulrich Niedermann <gp@n-dimensional.de
4 *
5 * \par License
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * \par
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * \par
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA
22 */
23
24 #include "config.h"
25
26 #include <stdlib.h>
27
28 #include <gphoto2/gphoto2-version.h>
29
gp_library_version(GPVersionVerbosity verbose)30 const char **gp_library_version(GPVersionVerbosity verbose)
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 */
126