there are a ton of ebuilds where you can find syntax such as this: use pic \ && myconf="${myconf} --with-pic" \ || myconf="${myconf} --without-pic" use gd \ && myconf="${myconf} --enable-libgd" \ || myconf="${myconf} --disable-libgd" some ebuilds even have multiple structures like this ... basically it comes down to the fact that we have this very common structure just to pass more things to the configure script my suggestion is to create 2 small functions so that we could shrink these common options down ... (if you have better names, please suggest them) use_with() { [ -z "$1" ] && return [ -n "`use $1`" ] \ && echo with \ || echo without } use_enable() { [ -z "$1" ] && return [ -n "`use $1`" ] \ && echo enable \ || echo disable } thus we can shrink the above examples down to: myconf="${myconf} --`use_with pic`-pic" myconf="${myconf} --`use_enable gd`-libgd"
also, this would take care of having to figure out which option the configure script chooses as default ... a lot of people are lazy with confirming whether something is enabled/disabled by default
in cvs