271 |
|
|
272 |
mconfigure() |
mconfigure() |
273 |
{ |
{ |
274 |
|
local configure_exec="./configure" |
275 |
|
|
276 |
|
if [[ ! -z ${MCONFIGURE_EXEC} ]] |
277 |
|
then |
278 |
|
if [ -x ${MCONFIGURE_EXEC} ] |
279 |
|
then |
280 |
|
echo -e "${COLBLUE}*** ${COLGREEN}Using '${MCONFIGURE_EXEC}' as configure script${COLDEFAULT}" |
281 |
|
configure_exec="${MCONFIGURE_EXEC}" |
282 |
|
else |
283 |
|
die "MCONFIGURE_EXEC '${MCONFIGURE_EXEC}' not executable" |
284 |
|
fi |
285 |
|
fi |
286 |
|
|
287 |
|
if [ ! -x ${configure_exec} ] |
288 |
|
then |
289 |
|
die "${configure_exec} not executable" |
290 |
|
fi |
291 |
|
|
292 |
local myopts |
local myopts |
293 |
if [[ ! -z ${CTARGET} ]] |
if [[ ! -z ${CTARGET} ]] |
294 |
then |
then |
295 |
myopts+=" --target=${CTARGET}" |
myopts+=" --target=${CTARGET}" |
296 |
fi |
fi |
297 |
|
|
298 |
if [ -x ./configure ] |
# if requested disable-static |
299 |
|
if [[ ! -z $(${configure_exec} --help | grep -- '--.*able-static') ]] |
300 |
then |
then |
301 |
# if requested disable-static |
if mqueryfeature '!static' |
|
if [[ ! -z $(./configure --help | grep -- '--.*able-static') ]] |
|
|
then |
|
|
if mqueryfeature '!static' |
|
|
then |
|
|
myopts+=" --disable-static" |
|
|
else |
|
|
myopts+=" --enable-static" |
|
|
fi |
|
|
fi |
|
|
|
|
|
# always enable shared by default but not for waf configure |
|
|
if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] && |
|
|
[[ -z $(./configure --version | grep waf) ]] |
|
302 |
then |
then |
303 |
myopts+=" --enable-shared" |
myopts+=" --disable-static" |
304 |
|
else |
305 |
|
myopts+=" --enable-static" |
306 |
fi |
fi |
307 |
|
fi |
308 |
|
|
309 |
./configure \ |
# always enable shared by default but not for waf configure |
310 |
--prefix=/usr \ |
if [[ ! -z $(${configure_exec} --help | grep -- '--.*able-shared') ]] && |
311 |
--host=${CHOST} \ |
[[ -z $(${configure_exec} --version | grep waf) ]] |
312 |
--build=${CHOST} \ |
then |
313 |
--mandir=/usr/share/man \ |
myopts+=" --enable-shared" |
|
--infodir=/usr/share/info \ |
|
|
--datadir=/usr/share \ |
|
|
--sysconfdir=/etc \ |
|
|
--localstatedir=/var/lib \ |
|
|
--libdir=/usr/$(mlibdir) \ |
|
|
${myopts} \ |
|
|
"$@" || die "mconfigure failed" |
|
|
else |
|
|
echo "configure is not an executable ..." |
|
|
exit 1 |
|
314 |
fi |
fi |
315 |
|
|
316 |
|
${configure_exec} \ |
317 |
|
--prefix=/usr \ |
318 |
|
--host=${CHOST} \ |
319 |
|
--build=${CHOST} \ |
320 |
|
--mandir=/usr/share/man \ |
321 |
|
--infodir=/usr/share/info \ |
322 |
|
--datadir=/usr/share \ |
323 |
|
--sysconfdir=/etc \ |
324 |
|
--localstatedir=/var/lib \ |
325 |
|
--libdir=/usr/$(mlibdir) \ |
326 |
|
${myopts} \ |
327 |
|
"$@" || die "mconfigure failed" |
328 |
} |
} |
329 |
|
|
330 |
minstall() |
minstall() |