Hello Ralf, thanks for your speedy and informative response. On Tue, Oct 12, 2010 at 1:29 AM, Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> wrote: > * Sam Steingold wrote on Tue, Oct 12, 2010 at 12:20:22AM CEST: >> Ralf Wildenhues wrote: >> >$srcdir/subdir/configure @module_configure_flags@ >> >> what is the right way to quote it? > > but in your case you could just do > > Âfor arg in @module_configure_flags@ thanks. >> Â Â CFLAGS* ) continue ;; > > Why would you strip out CFLAGS* ? because I think it is already inherited by sub-configures in the environment. if you think I don't have to strip it, I won't. >> [[[line 205]]] Â Â*\'*) arg="`$echo "$arg" | sed "s/'/'\\\\\\\\''/g"`" ;; > > This line is quoted wrongly, nested double-quotes within double-quoted > backticks are not portable. ÂThe Autoconf manual has all the details. > The portable variant of that is: > > Â Â Â Â Â Â Â Â Â Â*\'*) arg=`$echo "$arg" | sed "s/'/'\\\\\\\\''/g"` ;; thanks. here is what I have now, and it seems to work: # <http://thread.gmane.org/gmane.comp.sysutils.autoconf.general/13368> # strip out -srcdir* & -cache-file* keep_next=maybe module_configure_flags='' for arg in @module_configure_flags@; do case $arg in *\'*) arg=`$echo "$arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $keep_next in yes ) module_configure_flags="$module_configure_flags '$arg'"; keep_next=maybe; ;; no ) keep_next=maybe; ;; maybe ) case $arg in --cache-file=* | --srcdir=*) continue ;; --cache-file | --srcdir ) keep_next=no; ;; *=* ) module_configure_flags="$module_configure_flags '$arg'"; ;; *) module_configure_flags="$module_configure_flags '$arg'"; keep_next=yes; ;; esac ;; esac done unset arg unset keep_next -- Sam Steingold <http://sds.podval.org> _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf