You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@locus.apache.org on 2000/11/28 22:31:54 UTC

cvs commit: apr apr_common.m4 hints.m4

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.
  
  Revision  Changes    Path
  1.52      +1 -0      apache-2.0/src/acinclude.m4
  
  Index: acinclude.m4
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- acinclude.m4	2000/11/28 12:09:50	1.51
  +++ acinclude.m4	2000/11/28 21:31:50	1.52
  @@ -175,6 +175,7 @@
   
   sinclude(lib/apr/apr_common.m4)
   sinclude(lib/apr/hints.m4)
  +sinclude(hints.m4)
   
   AC_DEFUN(APACHE_CHECK_SIGWAIT_ONE_ARG,[
     AC_CACHE_CHECK(whether sigwait takes one argument,ac_cv_sigwait_one_arg,[
  
  
  
  1.92      +1 -0      apache-2.0/src/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/configure.in,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- configure.in	2000/11/28 12:09:50	1.91
  +++ configure.in	2000/11/28 21:31:51	1.92
  @@ -35,6 +35,7 @@
   dnl
   dnl ## Preload our OS configuration
   APR_PRELOAD
  +APACHE_PRELOAD
   
   dnl
   dnl Process command line arguments. This is done early in the process so the
  
  
  
  1.1                  apache-2.0/src/hints.m4
  
  Index: hints.m4
  ===================================================================
  dnl
  dnl APR_PRELOAD
  dnl
  dnl  Preload various ENV/makefile paramsm such as CC, CFLAGS, etc
  dnl  based on outside knowledge
  dnl
  AC_DEFUN(APACHE_PRELOAD, [
  echo "Applying hints file rules for $host"
  
  case "$host" in
      *-apple-aux3*)
  	APR_SETVAR(APACHE_MPM, [prefork])
          APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	;;
      *os2_emx*)
          APR_SETVAR(APACHE_MPM, [spmt_os2])
          APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	;;
      *-linux-*)
          case `uname -r` in
  	    2.2* ) APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	           ;;
  	    * )
  	           ;;
          esac
  	;;
      *486-*-bsdi*)
          APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	;;
      *-netbsd*)
          APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	;;
      *-freebsd*)
          APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	;;
  dnl    *-apple-rhapsody*)
  dnl     APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  dnl	;;
      *-apple-darwin*)
          APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	;;
      *-dec-osf*)
          APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	;;
      *-qnx)
          APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  	;;
  esac
  APR_DOEXTRA
  ])
  
  
  
  1.8       +62 -0     apr/apr_common.m4
  
  Index: apr_common.m4
  ===================================================================
  RCS file: /home/cvs/apr/apr_common.m4,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_common.m4	2000/11/02 05:01:08	1.7
  +++ apr_common.m4	2000/11/28 21:31:52	1.8
  @@ -211,3 +211,65 @@
     threads_result="POSIX Threads not found"
   fi
   ])dnl
  +
  +dnl
  +dnl Apache and APR "hints" file
  +dnl  We preload various configure settings depending
  +dnl  on previously obtained platform knowledge.
  +dnl  We allow all settings to be overridden from
  +dnl  the command-line.
  +dnl
  +dnl  We maintain the "format" that we've used
  +dnl  under 1.3.x, so we don't exactly follow
  +dnl  what is "recommended" by autoconf.
  +
  +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
  +])
  +
  +dnl
  +dnl APR_SETIFNULL(variable, value)
  +dnl
  +dnl  Set variable iff it's currently null
  +dnl
  +AC_DEFUN(APR_SETIFNULL,[
  +  if test -z "$$1"; then
  +    $1="$2"; export $1
  +  fi
  +])
  +
  +dnl
  +dnl APR_SETVAR(variable, value)
  +dnl
  +dnl  Set variable no matter what
  +dnl
  +AC_DEFUN(APR_SETVAR,[
  +  $1="$2"; export $1
  +])
  +
  +dnl
  +dnl APR_ADDTO(variable, value)
  +dnl
  +dnl  Add value to variable
  +dnl
  +AC_DEFUN(APR_ADDTO,[
  +   $1="$$1 $2"; export $1
  +])
  +
  
  
  
  1.24      +1 -75     apr/hints.m4
  
  Index: hints.m4
  ===================================================================
  RCS file: /home/cvs/apr/hints.m4,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- hints.m4	2000/11/13 04:50:35	1.23
  +++ hints.m4	2000/11/28 21:31:52	1.24
  @@ -1,65 +1,4 @@
   dnl
  -dnl Apache and APR "hints" file
  -dnl  We preload various configure settings depending
  -dnl  on previously obtained platform knowledge.
  -dnl  We allow all settings to be overridden from
  -dnl  the command-line.
  -dnl
  -dnl  We maintain the "format" that we've used
  -dnl  under 1.3.x, so we don't exactly follow
  -dnl  what is "recommended" by autoconf.
  -
  -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
  -])
  -
  -dnl
  -dnl APR_SETIFNULL(variable, value)
  -dnl
  -dnl  Set variable iff it's currently null
  -dnl
  -AC_DEFUN(APR_SETIFNULL,[
  -  if test -z "$$1"; then
  -    $1="$2"; export $1
  -  fi
  -])
  -
  -dnl
  -dnl APR_SETVAR(variable, value)
  -dnl
  -dnl  Set variable no matter what
  -dnl
  -AC_DEFUN(APR_SETVAR,[
  -  $1="$2"; export $1
  -])
  -
  -dnl
  -dnl APR_ADDTO(variable, value)
  -dnl
  -dnl  Add value to variable
  -dnl
  -AC_DEFUN(APR_ADDTO,[
  -   $1="$$1 $2"; export $1
  -])
  -
  -dnl
   dnl APR_PRELOAD
   dnl
   dnl  Preload various ENV/makefile paramsm such as CC, CFLAGS, etc
  @@ -83,8 +22,6 @@
   	APR_SETIFNULL(CFLAGS, [-DAUX3 -D_POSIX_SOURCE])
   	APR_SETIFNULL(LIBS, [-lposix -lbsd])
   	APR_SETIFNULL(LDFLAGS, [-s])
  -	APR_SETVAR(APACHE_MPM, [prefork])
  -        APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   	;;
       *-ibm-aix*)
           case $host in
  @@ -140,8 +77,6 @@
       *os2_emx*)
   	APR_SETIFNULL(SHELL, [sh])
           APR_SETIFNULL(file_as_socket, [0])
  -        APR_SETVAR(APACHE_MPM, [spmt_os2])
  -        APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   	;;
       *-hi-hiux)
   	APR_SETIFNULL(CFLAGS, [-DHIUX])
  @@ -166,8 +101,7 @@
   	;;
       *-linux-*)
           case `uname -r` in
  -	    2.2* ) APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
  -	           APR_SETIFNULL(CFLAGS, [-DLINUX=2])
  +	    2.2* ) APR_SETIFNULL(CFLAGS, [-DLINUX=2])
   	           APR_SETIFNULL(LIBS, [-lm])
   	           ;;
   	    2.0* ) APR_SETIFNULL(CFLAGS, [-DLINUX=2])
  @@ -189,12 +123,10 @@
   	;;
       *486-*-bsdi*)
   	APR_SETIFNULL(CFLAGS, [-m486])
  -        APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   	;;
       *-netbsd*)
   	APR_SETIFNULL(CFLAGS, [-DNETBSD])
   	APR_SETIFNULL(LIBS, [-lcrypt])
  -        APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   	;;
       *-freebsd*)
   	case $host in
  @@ -203,7 +135,6 @@
   		;;
   	esac
   	APR_SETIFNULL(LIBS, [-lcrypt])
  -        APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   	;;
       *-next-nextstep*)
   	APR_SETIFNULL(OPTIM, [-O])
  @@ -216,21 +147,17 @@
   	;;
   dnl    *-apple-rhapsody*)
   dnl	APR_SETIFNULL(CFLAGS, [-DDARWIN -DMAC_OS_X_SERVER])
  -dnl     APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   dnl	;;
       *-apple-darwin*)
   	APR_SETIFNULL(CFLAGS, [-DDARWIN])
  -        APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   	;;
       *-dec-osf*)
   	APR_SETIFNULL(CFLAGS, [-DOSF1])
   	APR_SETIFNULL(LIBS, [-lm])
  -        APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   	;;
       *-qnx)
   	APR_SETIFNULL(CFLAGS, [-DQNX])
   	APR_SETIFNULL(LIBS, [-N128k -lsocket -lunix])
  -        APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
   	;;
       *-qnx32)
           APR_SETIFNULL(CC, [cc -F])
  @@ -390,7 +317,6 @@
   	;;
       *beos*)
           APR_SETIFNULL(CFLAGS, [-DBEOS])
  -        APR_SETVAR(APACHE_MPM, [beos])
           PLATOSVERS=`uname -r`
           case $PLATOSVERS in
               5.1)
  
  
  

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
-------------------------------------------------------------------------------


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

Posted by Greg Stein <gs...@lyra.org>.
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 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/