parsav  Diff

Differences From Artifact [cba33505b3]:

To Artifact [74b801cbf1]:


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