Statistics
| Branch: | Tag: | Revision:

root / src / AutoConf.hs.in @ 0349f9c6

History | View | Annotate | Download (4.4 kB)

1
{-| Build-time configuration for Ganeti.
2

    
3
Note that this file is autogenerated by the Makefile with a header
4
from @AutoConf.hs.in@.
5

    
6
-}
7

    
8
{-
9

    
10
Copyright (C) 2013, 2014 Google Inc.
11

    
12
This program is free software; you can redistribute it and/or modify
13
it under the terms of the GNU General Public License as published by
14
the Free Software Foundation; either version 2 of the License, or
15
(at your option) any later version.
16

    
17
This program is distributed in the hope that it will be useful, but
18
WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20
General Public License for more details.
21

    
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25
02110-1301, USA.
26

    
27
-}
28

    
29
module AutoConf where
30

    
31
split :: String -> [String]
32
split str =
33
  case span (/= ',') str of
34
    (x, []) -> [x]
35
    (x, _:xs) -> x:split xs
36

    
37
packageVersion :: String
38
packageVersion = "PACKAGE_VERSION"
39

    
40
versionMajor :: Int
41
versionMajor = VERSION_MAJOR
42

    
43
versionMinor :: Int
44
versionMinor = VERSION_MINOR
45

    
46
versionRevision :: Int
47
versionRevision = VERSION_REVISION
48

    
49
versionSuffix :: String
50
versionSuffix = "VERSION_SUFFIX"
51

    
52
versionFull :: String
53
versionFull = "VERSION_FULL"
54

    
55
dirVersion :: String
56
dirVersion = "DIRVERSION"
57

    
58
localstatedir :: String
59
localstatedir = "LOCALSTATEDIR"
60

    
61
sysconfdir :: String
62
sysconfdir = "SYSCONFDIR"
63

    
64
sshConfigDir :: String
65
sshConfigDir = "SSH_CONFIG_DIR"
66

    
67
sshLoginUser :: String
68
sshLoginUser = "SSH_LOGIN_USER"
69

    
70
sshConsoleUser :: String
71
sshConsoleUser = "SSH_CONSOLE_USER"
72

    
73
exportDir :: String
74
exportDir = "EXPORT_DIR"
75

    
76
osSearchPath :: [String]
77
osSearchPath = split OS_SEARCH_PATH
78

    
79
esSearchPath :: [String]
80
esSearchPath = split ES_SEARCH_PATH
81

    
82
xenBootloader :: String
83
xenBootloader = "XEN_BOOTLOADER"
84

    
85
xenConfigDir :: String
86
xenConfigDir = "XEN_CONFIG_DIR"
87

    
88
xenKernel :: String
89
xenKernel = "XEN_KERNEL"
90

    
91
xenInitrd :: String
92
xenInitrd = "XEN_INITRD"
93

    
94
kvmKernel :: String
95
kvmKernel = "KVM_KERNEL"
96

    
97
sharedFileStorageDir :: String
98
sharedFileStorageDir = "SHARED_FILE_STORAGE_DIR"
99

    
100
iallocatorSearchPath :: [String]
101
iallocatorSearchPath = split IALLOCATOR_SEARCH_PATH
102

    
103
kvmPath :: String
104
kvmPath = "KVM_PATH"
105

    
106
ipPath :: String
107
ipPath = "IP_PATH"
108

    
109
socatPath :: String
110
socatPath = "SOCAT_PATH"
111

    
112
socatUseEscape :: Bool
113
socatUseEscape = SOCAT_USE_ESCAPE
114

    
115
socatUseCompress :: Bool
116
socatUseCompress = SOCAT_USE_COMPRESS
117

    
118
lvmStripecount :: Int
119
lvmStripecount = LVM_STRIPECOUNT
120

    
121
toolsdir :: String
122
toolsdir = "TOOLSDIR"
123

    
124
gntScripts :: [String]
125
gntScripts = GNT_SCRIPTS[]
126

    
127
htoolsProgs :: [String]
128
htoolsProgs = HS_HTOOLS_PROGS[]
129

    
130
pkglibdir :: String
131
pkglibdir = "PKGLIBDIR"
132

    
133
sharedir :: String
134
sharedir = "SHAREDIR"
135

    
136
versionedsharedir :: String
137
versionedsharedir = "VERSIONEDSHAREDIR"
138

    
139
drbdBarriers :: String
140
drbdBarriers = "DRBD_BARRIERS"
141

    
142
drbdNoMetaFlush :: Bool
143
drbdNoMetaFlush = DRBD_NO_META_FLUSH
144

    
145
syslogUsage :: String
146
syslogUsage = "SYSLOG_USAGE"
147

    
148
daemonsGroup :: String
149
daemonsGroup = "DAEMONS_GROUP"
150

    
151
adminGroup :: String
152
adminGroup = "ADMIN_GROUP"
153

    
154
masterdUser :: String
155
masterdUser = "MASTERD_USER"
156

    
157
masterdGroup :: String
158
masterdGroup = "MASTERD_GROUP"
159

    
160
metadUser :: String
161
metadUser = "METAD_USER"
162

    
163
metadGroup :: String
164
metadGroup = "METAD_GROUP"
165

    
166
rapiUser :: String
167
rapiUser = "RAPI_USER"
168

    
169
rapiGroup :: String
170
rapiGroup = "RAPI_GROUP"
171

    
172
confdUser :: String
173
confdUser = "CONFD_USER"
174

    
175
confdGroup :: String
176
confdGroup = "CONFD_GROUP"
177

    
178
kvmdUser :: String
179
kvmdUser = "KVMD_USER"
180

    
181
kvmdGroup :: String
182
kvmdGroup = "KVMD_GROUP"
183

    
184
luxidUser :: String
185
luxidUser = "LUXID_USER"
186

    
187
luxidGroup :: String
188
luxidGroup = "LUXID_GROUP"
189

    
190
nodedUser :: String
191
nodedUser = "NODED_USER"
192

    
193
nodedGroup :: String
194
nodedGroup = "NODED_GROUP"
195

    
196
mondUser :: String
197
mondUser = "MOND_USER"
198

    
199
mondGroup :: String
200
mondGroup = "MOND_GROUP"
201

    
202
diskSeparator :: String
203
diskSeparator = "DISK_SEPARATOR"
204

    
205
qemuimgPath :: String
206
qemuimgPath = "QEMUIMG_PATH"
207

    
208
htools :: Bool
209
htools = True
210

    
211
enableConfd :: Bool
212
enableConfd = ENABLE_CONFD
213

    
214
xenCmd :: String
215
xenCmd = "XEN_CMD"
216

    
217
enableRestrictedCommands :: Bool
218
enableRestrictedCommands = ENABLE_RESTRICTED_COMMANDS
219

    
220
enableMond :: Bool
221
enableMond = ENABLE_MOND
222

    
223
hasGnuLn :: Bool
224
hasGnuLn = HAS_GNU_LN
225

    
226
-- Write dictionary with man page name as the key and the section
227
-- number as the value
228
manPages :: [(String, Int)]
229
manPages = MAN_PAGES[]
230

    
231
pyAfInet4 :: Int
232
pyAfInet4 = AF_INET4
233

    
234
pyAfInet6 :: Int
235
pyAfInet6 = AF_INET6