On Fri, 2010-09-10 at 16:46 +1200, Amos Jeffries wrote: > On 10/09/10 07:08, Andrew Beverley wrote: > > > > >> * ARG_WITH if-yes clause then becomes: > >> case "$withval" in > >> yes|no) with_netfilter_conntrack=$withval ;; > >> *) netfilterconntrackpath=$withval ;; > >> esac > > > > Done. > > > >> * ARG_WITH needs an if-no clause doing with_netfilter_conntrack=no to > >> override the default. > > > > That's in the statement above no? > > no. > > An autoconf if-yes clause handles: > --with-foo > --with-foo=blah > (one of the cases we see sometimes on some weird OS is blah == "no", > that is what gets handled above) > > An autoconf if-no clause handles: > --without-foo > --without-foo=blah > > since we only care that its saying "without", we simply need to > hard-code with_netfilter_conntrack=no when it happens.
Hmmm, maybe I'm getting the wrong end of the stick here, but I think specifying --with-foo=no and --without-foo is the same (the macros both set $with_foo=no). From the autoconf manual: "--without-package is equivalent to --with-package=no" I've just tried it now and it seems to work like that. One other thing to note is that setting $with_foo before an AC_ARG_WITH (such as for a default) will force the AC_ARG_WITH to be skipped. Therefore, I have used the action-if-not-given functionality of AC_ARG_WITH to set a default value. Regards, Andy
