Re: common idiom for user definable substitution variables and defaults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

* John Calcote wrote on Fri, May 16, 2008 at 11:07:45PM CEST:
> Peter Michaux wrote:
> > AC_SUBST(XJS_LOAD_PATH)
> > if [[ -z "${XJS_LOAD_PATH}" ]]
> > then
> >   XJS_LOAD_PATH=".:~/lib/xjs:/usr/local/lib/xjs:/usr/lib/xjs:/lib/xjs"
> > fi

> > For one thing, the double brackets are just single brackets in my
> > configure file. That is ok but how to quote brackets? Do I just want
> > four brackets on each side?
> 
> You could just use "test":

True.  This chapter has all the gory (ugly) details about M4 quoting:
<http://www.gnu.org/software/autoconf/manual/html_node/M4-Quotation.html>

> test -z "${XJS_LOADPATH}" && XJS_LOAD_PATH="..."
> AC_SUBST(XJS_LOAD_PATH)

Also, if the user may have wanted to set XJS_LOAD_PATH to empty, you can
use
  : ${XJS_LOAD_PATH=".:..."}

You may want to consider using $HOME instead of ~ as not all shells do
tilde expansion.

Cheers,
Ralf


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux