157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
if type(e) == 'function'
then return e(conf)
else return e
end
end
return coalesce(
pkgenv(v),
pkv(e or v),
(fbo and eval(fbo[v])),
(fbv and eval(fbv[v])))
end
local name = cnfvar('override') or name
local pcname = coalesce(cnfvar('pcname'), name)
if conf.posix then
pkc = function(...) if locdep then return nil end
................................................................................
end
else pkc = nul end
else
print '(warn) configuring on non-POSIX OS, all relevant paths must be specified manually in environment variables or build will fail!'
end
locdep = u.ping('./lib/' .. name)
local incdir, libdir, prefix
if locdep then
prefix = './lib/' .. name
libdir = prefix .. coalesce(cnfvar('libbuilddir'),cnfvar('builddir'),'')
incdir = prefix .. coalesce(cnfvar('srcincdir'),cnfvar('builddir'),'/include')
else
prefix = coalesce(cnfvar('prefix'), '/usr')
libdir = cnfvar('libdir')
incdir = cnfvar('incdir','includedir')
end
libdir = libdir or prefix .. '/lib'
incdir = incdir or prefix .. '/include'
local libstr = pkc '--libs-only-l' -- (--static is not reliable)
local libs = fb and fb.libs or {}
local linkstatic = locdep
if (not locdep) and libstr then
libs = {}
for m in string.gmatch(libstr, '-l(%g+)') do
|
|
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
if type(e) == 'function'
then return e(conf)
else return e
end
end
return coalesce(
pkgenv(v),
e ~= false and pkv(e or v) or nil,
(fbo and eval(fbo[v])),
(fbv and eval(fbv[v])))
end
local name = cnfvar('override') or name
local pcname = coalesce(cnfvar('pcname'), name)
if conf.posix then
pkc = function(...) if locdep then return nil end
................................................................................
end
else pkc = nul end
else
print '(warn) configuring on non-POSIX OS, all relevant paths must be specified manually in environment variables or build will fail!'
end
locdep = u.ping('./lib/' .. name)
local incdir, libdir, prefix
local libsfx = coalesce(cnfvar('libsuffix',false),'')
local incsfx = coalesce(cnfvar('incsuffix',false),'')
if locdep then
prefix = './lib/' .. name
libdir = prefix .. coalesce(cnfvar 'libbuilddir',cnfvar 'builddir','')
incdir = prefix .. coalesce(cnfvar 'srcincdir', cnfvar 'builddir','/include')
else
prefix = coalesce(cnfvar 'prefix', '/usr')
libdir = cnfvar 'libdir'
if libdir then libdir = libdir .. libsfx end
incdir = cnfvar('incdir','includedir')
if incdir then incdir = incdir .. incsfx end
end
libdir = libdir or (prefix .. '/lib' .. libsfx)
incdir = incdir or (prefix .. '/include' .. incsfx)
local libstr = pkc '--libs-only-l' -- (--static is not reliable)
local libs = fb and fb.libs or {}
local linkstatic = locdep
if (not locdep) and libstr then
libs = {}
for m in string.gmatch(libstr, '-l(%g+)') do
|