Re [Gc]: two patches

Petter Urkedal urkedal at nbi.dk
Fri Nov 20 11:25:44 PST 2009


On 2009-11-20, Petter Urkedal wrote:
> On 2009-11-19, Ivan Maidanski wrote:
> > Hi!
> > "Daniel R. Grayson" <dan at math.uiuc.edu> wrote:
> > > diff -ur --exclude=configure /Users/dan/src/M2/trunk/BUILD/dan/ 
> > > builds.tmp/mac64.production/libraries/gc/tmp/gc-7.2alpha2/ 
> > > libatomic_ops-1.2/configure.ac gc-7.2alpha2/libatomic_ops-1.2/ 
> > > configure.ac
> > > ...
> > >   AC_CONFIG_FILES([Makefile src/Makefile src/atomic_ops/Makefile src/ 
> > > atomic_ops/sysdeps/Makefile doc/Makefile tests/Makefile])
> > > -AC_CONFIG_COMMANDS([default],[[]],[[PICFLAG=${PICFLAG}
> > > -CC=${CC}
> > > -DEFS=${DEFS}]])
> > > +AC_CONFIG_COMMANDS([default],[[]],[[
> > > +PICFLAG="${PICFLAG}"
> > > +CC="${CC}"
> > > +DEFS="${DEFS}"
> > > +]])
> > >   AC_OUTPUT
> > > ...
> > 
> > Petter -
> > Do you think it's worth applying?
> 
> The problem is solved in CVS head:
> 
> AC_CONFIG_COMMANDS([default],,
>   [ srcdir=${srcdir}
>     host=${host}
>     CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
>     CC="${CC}"
>     DEFS="$DEFS" ])
> 
> On the other hand, I'm not sure why we substitute CC and DEFS like this, maybe
> it's not needed anymore.  (The fragment is from 2005-10-10.)

Apparently I wasn't awake yet when I wrote this, as I was looking at the
wrong configure script.  Daniel's suggestion looks good to me, and
probably fixes a real problem with the "DEFS" assignment for some
shells, since this variable typically contains spaces.  I say "some
shells", because others, like bash, don't require quoting the right hand
side if it is a variable, even if its expansion contains spaces.  That
may explain why you couldn't reproduce the problem.

Still, does anyone know the purpose of the cited commands?  Their effect
is to make the variables available within "config.status", but that is
usually only required if one has other config-commands which use them.
For substituting into the Makefile, etc., AC_SUBST or AC_ARG_VAR should
suffice.


More information about the Gc mailing list