[Top][All Lists]

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

[avrdude-dev] avrdude and new autotools

From: Ville Voipio
Subject: [avrdude-dev] avrdude and new autotools
Date: Wed, 30 Apr 2008 15:48:53 +0300
User-agent: Thunderbird (Windows/20080213)

A known problem is that avrdude is not (or at least was not) compileable with new autotools. I just bumped into this problem with Ubuntu 7.10 (and AFAIK, 7.04 and 8.04 will have the same problem). Having several versions of autotools installed in the same system seems to be a bit awkward, so avrdude should compile with modern versions, as well.

I took a look into this problem (a.k.a @WINDOWS_DIRS@) with automake 1.10 and autoconf 2.61.

The problem stems from recursive use of variable substitution. Something like this (oh, feel free to correct me, I know next to nothing about autotools, I just needed to get this fixed):


FOO="this @BAR@"
BAR="is recursive"



X = @FOO@

Now, if the substitution were recursive, we should have two stepas with X:

X = @FOO@
X = "this @BAR@"
X = "this is recursive"

But as there does not seem to be recursive variable substitution in the modern versions, we are left with "this @BAR@" which is certainly not what we wanted ("dir @WINDOWS_DIRS@" instead of "dir windows").

I wonder why this worked with autoconf 2.57. Maybe the parser has been changed to a single-pass one or something else. Anyway, to avoid nested substitutions, this can be overcome by:


BAR="is not recursive"



X = @FOO@
X += @BAR@

(Actually, the += operation is reduced away when processing Makefile.am into Makefile.)

Another way to go around this is to make the substitution already in configure.ac.

Yet another problem I encountered is the lack of AM_PROG_CC_C_O in configure.ac.

If these changes sound reasonable, I'll post a patch if someone wants to try with older versions.

- Ville

reply via email to

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