Re: cvs commit: apr apr_common.m4 hints.m4
You know, back-pedaling a little bit, the current setup is easily expandable, just by adding another variable name to the 'for i...' line. Lots of duplicated code. How about if I just better explain the "magic"? -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ "Casanova will have many weapons; To beat him you will have to have more than forks and flatulence."
Re: cvs commit: apr apr_common.m4 hints.m4
Jim Jagielski wrote: > > I need to check what it's being done for, but the reason for the > exports and the evals is because you need to "protect" the use of > the vars until you actually need to use them. Recall that autconf > simply cuts and pastes, so it will see what they are defined as > at that time, and use those values. The evals' are there to > ensure that happens. The exports were to make sure that any sub-configures > picked up the changes, something we most likely need in APR anyway > (eg: MM?). I don't think the above will work, at least it won't in > the original way we were using it. > Ahh. With the new setup, it *will* in fact work. This is good. I was never too keen with the evals, but it was the only viable solution at that time. +1 on the change. -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ "Casanova will have many weapons; To beat him you will have to have more than forks and flatulence."
Re: cvs commit: apr apr_common.m4 hints.m4
Greg Stein wrote: > > > > I see that this came from apr/hints.m4, but I don't understand what it is > > > really doing here. What is this extra magic? > > > > > > AFAIK, all we need to do is set the variables, and that is that. No fancy > > > export or anything. > > > > Unfortunately, as Jim found when he first did this stuff, Autoconf doesn't > > use the EXTRA_* variables, so this is a bit of a hack. > > Ah. I think I understand. Wouldn't the above be simpler and more obvious if > we wrote it like: > > AC_DEFIN(APR_DOEXTRA, [ > CFLAGS="$CFLAGS $EXTRA_CFLAGS" > EXTRA_CFLAGS="" > LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" > EXTRA_LDFLAGS="" > LIBS="$LIBS $EXTRA_LIBS" > EXTRA_LIBS="" > ]) > > Presuming the above works as expected, then I'd like to change the code. > I need to check what it's being done for, but the reason for the exports and the evals is because you need to "protect" the use of the vars until you actually need to use them. Recall that autconf simply cuts and pastes, so it will see what they are defined as at that time, and use those values. The evals' are there to ensure that happens. The exports were to make sure that any sub-configures picked up the changes, something we most likely need in APR anyway (eg: MM?). I don't think the above will work, at least it won't in the original way we were using it. -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ "Casanova will have many weapons; To beat him you will have to have more than forks and flatulence."
Re: cvs commit: apr apr_common.m4 hints.m4
On Wed, Nov 29, 2000 at 09:46:51PM +0100, Branko Cibej wrote: > [EMAIL PROTECTED] wrote: > > >> Ah. I think I understand. Wouldn't the above be simpler and more obvious if > >> we wrote it like: > >> > >> AC_DEFIN(APR_DOEXTRA, [ > >> CFLAGS="$CFLAGS $EXTRA_CFLAGS" > >> EXTRA_CFLAGS="" > >> LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" > >> EXTRA_LDFLAGS="" > >> LIBS="$LIBS $EXTRA_LIBS" > >> EXTRA_LIBS="" > >> ]) > >> > >> Presuming the above works as expected, then I'd like to change the code. > > > > > > The docs really explain what is happening, and this will allow us to add > > more EXTRA_ options later really cleanly. > > These should be exported in APRVARS, too. We've got EXTRA_CPPFLAGS, EXTRA_CFLAGS, and EXTRA_LIBS in there today. Missing the LDFLAGS stuff. Cheers, -g -- Greg Stein, http://www.lyra.org/
Re: cvs commit: apr apr_common.m4 hints.m4
[EMAIL PROTECTED] wrote: Ah. I think I understand. Wouldn't the above be simpler and more obvious if we wrote it like: AC_DEFIN(APR_DOEXTRA, [ CFLAGS="$CFLAGS $EXTRA_CFLAGS" EXTRA_CFLAGS="" LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" EXTRA_LDFLAGS="" LIBS="$LIBS $EXTRA_LIBS" EXTRA_LIBS="" ]) Presuming the above works as expected, then I'd like to change the code. The docs really explain what is happening, and this will allow us to add more EXTRA_ options later really cleanly. These should be exported in APRVARS, too. -- Brane Čibej home: <[EMAIL PROTECTED]> http://www.xbc.nu/brane/ work: <[EMAIL PROTECTED]> http://www.hermes-softlab.com/ ACM: <[EMAIL PROTECTED]>http://www.acm.org/
Re: cvs commit: apr apr_common.m4 hints.m4
> > > > +AC_DEFUN(APR_DOEXTRA, [ > > > > + for i in CFLAGS LDFLAGS LIBS > > > > + do > > > > +eval APR_TMP=\$EXTRA_$i > > > > +if test -n "$APR_TMP"; then > > > > + eval $i=\"\$$i $APR_TMP\" > > > > + eval export $i > > > > + eval unset EXTRA_${i} > > > > + eval export EXTRA_${i} > > > > +fi > > > > + done > > > > +]) > > > > Unfortunately, as Jim found when he first did this stuff, Autoconf doesn't > > use the EXTRA_* variables, so this is a bit of a hack. > > Ah. I think I understand. Wouldn't the above be simpler and more obvious if > we wrote it like: > > AC_DEFIN(APR_DOEXTRA, [ > CFLAGS="$CFLAGS $EXTRA_CFLAGS" > EXTRA_CFLAGS="" > LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" > EXTRA_LDFLAGS="" > LIBS="$LIBS $EXTRA_LIBS" > EXTRA_LIBS="" > ]) > > Presuming the above works as expected, then I'd like to change the code. The docs really explain what is happening, and this will allow us to add more EXTRA_ options later really cleanly. Ryan ___ Ryan Bloom [EMAIL PROTECTED] 406 29th St. San Francisco, CA 94131 ---
Re: cvs commit: apr apr_common.m4 hints.m4
On Wed, Nov 29, 2000 at 08:08:54AM -0800, [EMAIL PROTECTED] wrote: > On Wed, 29 Nov 2000, Greg Stein wrote: > > On Tue, Nov 28, 2000 at 09:31:54PM -, [EMAIL PROTECTED] wrote: >... > > >... > > > +dnl > > > +dnl APR_DOEXTRA > > > +dnl > > > +dnl Handle the use of EXTRA_* variables. > > > +dnl Basically, EXTRA_* vars are added to the > > > +dnl current settings of their "parents". We > > > +dnl can expand as needed. This is ugly > > > +dnl > > > +AC_DEFUN(APR_DOEXTRA, [ > > > + for i in CFLAGS LDFLAGS LIBS > > > + do > > > +eval APR_TMP=\$EXTRA_$i > > > +if test -n "$APR_TMP"; then > > > + eval $i=\"\$$i $APR_TMP\" > > > + eval export $i > > > + eval unset EXTRA_${i} > > > + eval export EXTRA_${i} > > > +fi > > > + done > > > +]) > > > > I see that this came from apr/hints.m4, but I don't understand what it is > > really doing here. What is this extra magic? > > > > AFAIK, all we need to do is set the variables, and that is that. No fancy > > export or anything. > > Unfortunately, as Jim found when he first did this stuff, Autoconf doesn't > use the EXTRA_* variables, so this is a bit of a hack. Ah. I think I understand. Wouldn't the above be simpler and more obvious if we wrote it like: AC_DEFIN(APR_DOEXTRA, [ CFLAGS="$CFLAGS $EXTRA_CFLAGS" EXTRA_CFLAGS="" LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" EXTRA_LDFLAGS="" LIBS="$LIBS $EXTRA_LIBS" EXTRA_LIBS="" ]) Presuming the above works as expected, then I'd like to change the code. Cheers, -g -- Greg Stein, http://www.lyra.org/
Re: cvs commit: apr apr_common.m4 hints.m4
On Wed, 29 Nov 2000, Greg Stein wrote: > On Tue, Nov 28, 2000 at 09:31:54PM -, [EMAIL PROTECTED] wrote: > > rbb 00/11/28 13:31:53 > > > > Modified:src acinclude.m4 configure.in > >.apr_common.m4 hints.m4 > > Added: src hints.m4 > > Log: > > Split the hints file into two files, one in APR and one in Apache. The > > APR > > hints file just sets build variables, the Apache hints file just sets > > Apache variables. This is meant to clean up parts of APR, so that they > > don't include Apache information. > >... > > --- apr_common.m4 2000/11/02 05:01:08 1.7 > > +++ apr_common.m4 2000/11/28 21:31:52 1.8 > >... > > +dnl > > +dnl APR_DOEXTRA > > +dnl > > +dnl Handle the use of EXTRA_* variables. > > +dnl Basically, EXTRA_* vars are added to the > > +dnl current settings of their "parents". We > > +dnl can expand as needed. This is ugly > > +dnl > > +AC_DEFUN(APR_DOEXTRA, [ > > + for i in CFLAGS LDFLAGS LIBS > > + do > > +eval APR_TMP=\$EXTRA_$i > > +if test -n "$APR_TMP"; then > > + eval $i=\"\$$i $APR_TMP\" > > + eval export $i > > + eval unset EXTRA_${i} > > + eval export EXTRA_${i} > > +fi > > + done > > +]) > > I see that this came from apr/hints.m4, but I don't understand what it is > really doing here. What is this extra magic? > > AFAIK, all we need to do is set the variables, and that is that. No fancy > export or anything. Unfortunately, as Jim found when he first did this stuff, Autoconf doesn't use the EXTRA_* variables, so this is a bit of a hack. Ryan ___ Ryan Bloom [EMAIL PROTECTED] 406 29th St. San Francisco, CA 94131 ---
Re: cvs commit: apr apr_common.m4 hints.m4
On Tue, Nov 28, 2000 at 09:31:54PM -, [EMAIL PROTECTED] wrote: > rbb 00/11/28 13:31:53 > > Modified:src acinclude.m4 configure.in >.apr_common.m4 hints.m4 > Added: src hints.m4 > Log: > Split the hints file into two files, one in APR and one in Apache. The APR > hints file just sets build variables, the Apache hints file just sets > Apache variables. This is meant to clean up parts of APR, so that they > don't include Apache information. >... > --- apr_common.m4 2000/11/02 05:01:08 1.7 > +++ apr_common.m4 2000/11/28 21:31:52 1.8 >... > +dnl > +dnl APR_DOEXTRA > +dnl > +dnl Handle the use of EXTRA_* variables. > +dnl Basically, EXTRA_* vars are added to the > +dnl current settings of their "parents". We > +dnl can expand as needed. This is ugly > +dnl > +AC_DEFUN(APR_DOEXTRA, [ > + for i in CFLAGS LDFLAGS LIBS > + do > +eval APR_TMP=\$EXTRA_$i > +if test -n "$APR_TMP"; then > + eval $i=\"\$$i $APR_TMP\" > + eval export $i > + eval unset EXTRA_${i} > + eval export EXTRA_${i} > +fi > + done > +]) I see that this came from apr/hints.m4, but I don't understand what it is really doing here. What is this extra magic? AFAIK, all we need to do is set the variables, and that is that. No fancy export or anything. Cheers, -g -- Greg Stein, http://www.lyra.org/