You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Greg Stein <gs...@lyra.org> on 2000/11/29 10:47:23 UTC

Re: cvs commit: apr apr_common.m4 hints.m4

On Tue, Nov 28, 2000 at 09:31:54PM -0000, rbb@locus.apache.org 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/

Re: cvs commit: apr apr_common.m4 hints.m4

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Nov 29, 2000 at 09:46:51PM +0100, Branko Cibej wrote:
> rbb@covalent.net 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

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Nov 29, 2000 at 09:46:51PM +0100, Branko Cibej wrote:
> rbb@covalent.net 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

Posted by Branko Čibej <br...@xbc.nu>.
rbb@covalent.net 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:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <br...@acm.org>            http://www.acm.org/



Re: cvs commit: apr apr_common.m4 hints.m4

Posted by Branko Čibej <br...@xbc.nu>.
rbb@covalent.net 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:   <br...@xbc.nu>             http://www.xbc.nu/brane/
    work:   <br...@hermes.si>   http://www.hermes-softlab.com/
     ACM:   <br...@acm.org>            http://www.acm.org/



Re: cvs commit: apr apr_common.m4 hints.m4

Posted by rb...@covalent.net.
> > > >   +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                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Re: cvs commit: apr apr_common.m4 hints.m4

Posted by rb...@covalent.net.
> > > >   +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                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Re: cvs commit: apr apr_common.m4 hints.m4

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Nov 29, 2000 at 08:08:54AM -0800, rbb@covalent.net wrote:
> On Wed, 29 Nov 2000, Greg Stein wrote:
> > On Tue, Nov 28, 2000 at 09:31:54PM -0000, rbb@locus.apache.org 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

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Nov 29, 2000 at 08:08:54AM -0800, rbb@covalent.net wrote:
> On Wed, 29 Nov 2000, Greg Stein wrote:
> > On Tue, Nov 28, 2000 at 09:31:54PM -0000, rbb@locus.apache.org 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

Posted by rb...@covalent.net.
On Wed, 29 Nov 2000, Greg Stein wrote:

> On Tue, Nov 28, 2000 at 09:31:54PM -0000, rbb@locus.apache.org 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                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apr apr_common.m4 hints.m4

Posted by rb...@covalent.net.
On Wed, 29 Nov 2000, Greg Stein wrote:

> On Tue, Nov 28, 2000 at 09:31:54PM -0000, rbb@locus.apache.org 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                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------