]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - make/template/config.h
Clean up and document the config header file.
[user/henk/code/inspircd.git] / make / template / config.h
1 /*
2  * InspIRCd -- Internet Relay Chat Daemon
3  *
4  *   Copyright (C) 2014 Peter Powell <petpow@saberuk.com>
5  *
6  * This file is part of InspIRCd.  InspIRCd is free software: you can
7  * redistribute it and/or modify it under the terms of the GNU General Public
8  * License as published by the Free Software Foundation, version 2.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19
20 #pragma once
21
22 /*** The branch version that is shown to unprivileged users. */
23 #define INSPIRCD_BRANCH "InspIRCd-@VERSION_MAJOR@"
24
25 /*** The full version that is shown to privileged users. */
26 #define INSPIRCD_VERSION "InspIRCd-@VERSION_FULL@"
27
28 /*** Determines whether this version of InspIRCd is older than the requested version. */
29 #define INSPIRCD_VERSION_BEFORE(MAJOR, MINOR) (((@VERSION_MAJOR@ << 8) | @VERSION_MINOR@) < ((MAJOR << 8) | (MINOR)))
30
31 /*** Determines whether this version of InspIRCd is equal to or newer than the requested version. */
32 #define INSPIRCD_VERSION_SINCE(MAJOR, MINOR) (((@VERSION_MAJOR@ << 16) | @VERSION_MINOR@) >= ((MAJOR << 8) | (MINOR)))
33
34 /*** The default location that config files are stored in. */
35 #define INSPIRCD_CONFIG_PATH "@CONFIG_DIR@"
36
37 /*** The default location that data files are stored in. */
38 #define INSPIRCD_DATA_PATH "@DATA_DIR@"
39
40 /*** The default location that log files are stored in. */
41 #define INSPIRCD_LOG_PATH "@LOG_DIR@"
42
43 /*** The default location that module files are stored in. */
44 #define INSPIRCD_MODULE_PATH "@MODULE_DIR@"
45
46 #ifndef _WIN32
47  %target include/config.h
48
49 /*** Whether the arc4random_buf() function was available at compile time. */
50  %define HAS_ARC4RANDOM_BUF
51
52 /*** Whether the clock_gettime() function was available at compile time. */
53  %define HAS_CLOCK_GETTIME
54
55 /*** Whether the eventfd() function was available at compile time. */
56  %define HAS_EVENTFD
57
58 #endif