autoconf
[Top][All Lists]
Advanced

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

Re: Annoying warning message is now an error!


From: Pavel Roskin
Subject: Re: Annoying warning message is now an error!
Date: Sun, 29 Oct 2000 22:10:05 -0500 (EST)

Hello, Mo!

> checking for gdb... /usr/local/project/install/insight/bin/gdb
> /home/mo/project/tcljava_ajuba/clean/tcljava/configure: syntax error near 
> unexpected token `"(c' 
> /home/mo/project/tcljava_ajuba/clean/tcljava/configure: 
> /home/mo/project/tcljava_ajuba/clean/tcljava/configure: line 3207: `  
> echo $ECHO_N "(cached) $ECHO_C" >&6'

You are not quoting the arguments of AC_CACHE_CHECK in tcljava.m4

It appears that older versions of autoconf would generate (somewhat)
working code when some quotes are missing, but the new Autoconf will
silently generate broken code.

I'm afraid that we will be overwhelmed with such "bugreports" :-(

Autoconf catches overquoting but not underquoting. I believe that at least
some basic cases of underquoting should be detected.

For example, we could requite that AC_DEFINE'd macros are not passed
unquoted to other AC_DEFINE'd macros. For that purpose AC_DEFINE should
define some flag and check that it's not already defined while it's
arguments were expanded.

I'm not a guru in m4, but I believe it's possible. This is a very
simplified example that catches unquoted arguments to my_define:

#! /usr/bin/m4
divert(-1)
changequote([, ])
define([my_define], [ifdef([flag], [errprint([Non-quoted argument
])])
define([$1], [define([flag])$2])
undefine([flag])])
my_define([m1], [v1])
my_define([m2], [m1])
my_define([m3], m1)
divert(0)
m1
m2
m3

We obviously want to catch unquoted arguments to other macros than
AC_DEFUN which may (or may not) be harder.

Regards,
Pavel Roskin




reply via email to

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