ZNC  trunk
version.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2004-2024 ZNC, see the NOTICE file for details.
3 
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16 #ifndef ZNC_VERSION_H
17 #define ZNC_VERSION_H
18 
19 // Don't use this one
20 #define VERSION (VERSION_MAJOR + VERSION_MINOR / 10.0)
21 
22 // CMake: You can add -DVERSION_EXTRA=stuff to cmake!
23 #ifndef VERSION_EXTRA
24 #define VERSION_EXTRA ""
25 #endif
26 extern const char* ZNC_VERSION_EXTRA;
27 
28 // Compilation options which affect ABI
29 
30 #ifdef HAVE_IPV6
31 #define ZNC_VERSION_TEXT_IPV6 "yes"
32 #else
33 #define ZNC_VERSION_TEXT_IPV6 "no"
34 #endif
35 
36 #ifdef HAVE_LIBSSL
37 #define ZNC_VERSION_TEXT_SSL "yes"
38 #else
39 #define ZNC_VERSION_TEXT_SSL "no"
40 #endif
41 
42 #ifdef HAVE_THREADED_DNS
43 #define ZNC_VERSION_TEXT_DNS "threads"
44 #else
45 #define ZNC_VERSION_TEXT_DNS "blocking"
46 #endif
47 
48 #ifdef HAVE_ICU
49 #define ZNC_VERSION_TEXT_ICU "yes"
50 #else
51 #define ZNC_VERSION_TEXT_ICU "no"
52 #endif
53 
54 #ifdef HAVE_I18N
55 #define ZNC_VERSION_TEXT_I18N "yes"
56 #else
57 #define ZNC_VERSION_TEXT_I18N "no"
58 #endif
59 
60 // This is only here because HASH_DEFAULT has different value
61 #ifdef ZNC_HAVE_ARGON
62 #define ZNC_VERSION_TEXT_ARGON "yes"
63 #else
64 #define ZNC_VERSION_TEXT_ARGON "no"
65 #endif
66 
67 #define ZNC_COMPILE_OPTIONS_STRING \
68  "IPv6: " ZNC_VERSION_TEXT_IPV6 ", SSL: " ZNC_VERSION_TEXT_SSL \
69  ", DNS: " ZNC_VERSION_TEXT_DNS ", charset: " ZNC_VERSION_TEXT_ICU \
70  ", i18n: " ZNC_VERSION_TEXT_I18N ", Argon2: " ZNC_VERSION_TEXT_ARGON
71 
72 #endif // !ZNC_VERSION_H
const char * ZNC_VERSION_EXTRA