2014-08-30 09:10:11 +02:00
|
|
|
# vim: set ts=4 sw=4 et:
|
|
|
|
|
|
|
|
vopt_if() {
|
2014-09-05 16:37:08 +02:00
|
|
|
local name="build_option_$1" t="$2" f="$3"
|
2014-08-30 09:10:11 +02:00
|
|
|
if [ ${!name} ]; then
|
|
|
|
echo -n "$t"
|
|
|
|
else
|
|
|
|
echo -n "$f"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
vopt_with() {
|
|
|
|
local opt="$1" flag="${2:-$1}"
|
2014-09-05 16:37:08 +02:00
|
|
|
vopt_if "$opt" "--with-${flag}" "--without-${flag}"
|
2014-08-30 09:10:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
vopt_enable() {
|
|
|
|
local opt="$1" flag="${2:-$1}"
|
|
|
|
vopt_if "$1" "--enable-${flag}" "--disable-${flag}"
|
|
|
|
}
|
|
|
|
|