You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2003/03/07 13:12:43 UTC

cvs commit: apr/build apr_common.m4

trawick     2003/03/07 04:12:40

  Modified:    build    apr_common.m4
  Log:
  change APR_CHECK_APR_DEFINE to find header files via
  the INCLUDES setting rather than via a path passed
  in via the caller
  
  Revision  Changes    Path
  1.53      +8 -7      apr/build/apr_common.m4
  
  Index: apr_common.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_common.m4,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- apr_common.m4	17 Feb 2003 02:36:21 -0000	1.52
  +++ apr_common.m4	7 Mar 2003 12:12:40 -0000	1.53
  @@ -271,15 +271,16 @@
   ])
   
   dnl
  -dnl APR_CHECK_APR_DEFINE( symbol, path_to_apr )
  +dnl APR_CHECK_APR_DEFINE( symbol )
   dnl
   AC_DEFUN(APR_CHECK_APR_DEFINE,[
  -    AC_EGREP_CPP(YES_IS_DEFINED, [
  -#include "$2/include/apr.h"
  -#if $1
  -YES_IS_DEFINED
  -#endif
  -    ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
  +apr_old_cppflags=$CPPFLAGS
  +CPPFLAGS="$CPPFLAGS $INCLUDES"
  +AC_TRY_COMPILE([#include <apr.h>], [
  +#if !$1
  +#error APR does not have $1
  +#endif], ac_cv_define_$1=yes, ac_cv_define_$1=no)
  +CPPFLAGS=$apr_old_cppflags
   ])
   
   dnl APR_CHECK_FILE(filename); set ac_cv_file_filename to
  
  
  

Re: cvs commit: apr/build apr_common.m4

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Fri, Mar 07, 2003 at 12:12:43PM -0000, Jeff Trawick wrote:
>   -dnl APR_CHECK_APR_DEFINE( symbol, path_to_apr )
>   +dnl APR_CHECK_APR_DEFINE( symbol )
>    dnl
>    AC_DEFUN(APR_CHECK_APR_DEFINE,[
>   -    AC_EGREP_CPP(YES_IS_DEFINED, [
>   -#include "$2/include/apr.h"
>   -#if $1
>   -YES_IS_DEFINED
>   -#endif
>   -    ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
>   +apr_old_cppflags=$CPPFLAGS
>   +CPPFLAGS="$CPPFLAGS $INCLUDES"
>   +AC_TRY_COMPILE([#include <apr.h>], [

Hi - does this really need to use AC_TRY_COMPILE not AC_EGREP_CPP? The
latter can be much faster.

Regards,

joe