Pyrogenesis
HEAD
Pyrogenesis, a RTS Engine
config2.h
Go to the documentation of this file.
1
/* Copyright (C) 2021 Wildfire Games.
2
*
3
* Permission is hereby granted, free of charge, to any person obtaining
4
* a copy of this software and associated documentation files (the
5
* "Software"), to deal in the Software without restriction, including
6
* without limitation the rights to use, copy, modify, merge, publish,
7
* distribute, sublicense, and/or sell copies of the Software, and to
8
* permit persons to whom the Software is furnished to do so, subject to
9
* the following conditions:
10
*
11
* The above copyright notice and this permission notice shall be included
12
* in all copies or substantial portions of the Software.
13
*
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
*/
22
23
/*
24
* compile-time configuration for isolated spots
25
*/
26
27
#ifndef INCLUDED_CONFIG2
28
#define INCLUDED_CONFIG2
29
30
// rationale: a centralized header makes it much easier to see what all
31
// can be changed. it is assumed that only a few modules will need
32
// configuration choices, so rebuilding them all is acceptable.
33
// use config.h when settings must apply to the entire project.
34
35
// allow use of RDTSC for raw tick counts (otherwise, the slower but
36
// more reliable on MP systems wall-clock will be used).
37
#ifndef CONFIG2_TIMER_ALLOW_RDTSC
38
# define CONFIG2_TIMER_ALLOW_RDTSC 1
39
#endif
40
41
// this enables/disables the actual checking done by OverrunProtector
42
// (quite slow, entailing mprotect() before/after each access).
43
// define to 1 here or in the relevant module if you suspect mem corruption.
44
// we provide this option because OverrunProtector requires some changes to
45
// the object being wrapped, and we want to leave those intact but not
46
// significantly slow things down except when needed.
47
#ifndef CONFIG2_ALLOCATORS_OVERRUN_PROTECTION
48
# define CONFIG2_ALLOCATORS_OVERRUN_PROTECTION 0
49
#endif
50
51
#ifndef CONFIG2_FILE_ENABLE_AIO
52
// work around a bug introduced in Linux 2.6.38
53
// (http://www.wildfiregames.com/forum/index.php?showtopic=14561&view=findpost&p=217710)
54
// OpenBSD doesn't provide aio.h so we disable its use
55
# if OS_LINUX || OS_OPENBSD
56
# define CONFIG2_FILE_ENABLE_AIO 0
57
# else
58
# define CONFIG2_FILE_ENABLE_AIO 1
59
# endif
60
#endif
61
62
// build in OpenGL ES 2.0 mode, instead of the default mode designed for
63
// GL 1.1 + extensions.
64
// this disables various features that are not supported by GLES.
65
#ifndef CONFIG2_GLES
66
# define CONFIG2_GLES 0
67
#endif
68
69
// allow use of OpenAL/Ogg/Vorbis APIs
70
#ifndef CONFIG2_AUDIO
71
# define CONFIG2_AUDIO 1
72
#endif
73
74
// allow use of NVTT
75
#ifndef CONFIG2_NVTT
76
# define CONFIG2_NVTT 1
77
#endif
78
79
// allow use of lobby
80
#ifndef CONFIG2_LOBBY
81
# define CONFIG2_LOBBY 1
82
#endif
83
84
// allow use of miniupnpc
85
#ifndef CONFIG2_MINIUPNPC
86
# define CONFIG2_MINIUPNPC 1
87
#endif
88
89
// default disable valgrind
90
#ifndef CONFIG2_VALGRIND
91
# define CONFIG2_VALGRIND 0
92
#endif
93
94
#endif
// #ifndef INCLUDED_CONFIG2
source
lib
config2.h
Generated by
1.9.4