[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sat, 23 Oct 2004 14:21:23 +0200
On Sat, Oct 23, 2004 at 11:06:10AM +1000, Russell Shaw wrote:
> [set default border size for negative plots (mm)]),
> if test "$withval" = "yes" -o "$withval" = "no" ; then
> AC_MSG_ERROR([Invalid value for excellon format: $withval],1)
you are out of the AC_ARG_WITH macro, so you'd be safer if you used the
$with_border variable instead of $withval.
> AC_DEFINE_UNQUOTED([GERBTOEPS_DEFAULT_BORDER],[$border],[Default border
> (i'm still not sure if double quotes [[...]] are the right thing or not)
Double brackets should be used to quote ``literal strings'', ie. strings
which don't contain m4 macros. In your example, all single brackets can
be replaced with double, with two exceptions: the last parameter of macro
AC_HELP_STRING and AC_DEFINE_UNQUOTED---these texts may be subject to line
breaking, so they are not literal strings.
OTOH, if the text is simple and there is no danger that a m4 macro could
be invoked, you don't need any quoting. From this perspective, you could
delete all chars [ and ] from your example and it would still work.
But it is good habit to leave the (single) brackets at least around the
descriptive texts (last params of AC_HELP_STRING and AC_DEFINE_UNQUOTED),
as they could easily contain a comma.
When you quote a parameter with single brackets, you only indicate "this
is the parameter" and nothing else. The brackets are removed and the
rest is subject to macro expansion later.
So you can happily write:
[set default border size for negative plots (mm)])],
but, of course, the following would be a disaster:
[set default border size for negative plots (mm)])]],
Hope this explains it. The autoconf manual has a section about quoting.
Have a nice day,