autoconf
[Top][All Lists]
Advanced

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

Re: common idiom for user definable substitution variables and defaults


From: Ralf Wildenhues
Subject: Re: common idiom for user definable substitution variables and defaults
Date: Sun, 18 May 2008 12:06:30 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]