apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@apache.org
Subject cvs commit: apr CHANGES apr_common.m4
Date Fri, 09 Feb 2001 19:23:08 GMT
fielding    01/02/09 11:23:07

  Modified:    .        CHANGES apr_common.m4
  Log:
  Change the macro name to APR_COMPILE_NO_WARNING and make it
  active for all compilers rather than just gcc.  The environment
  variable CFLAGS_WARN can be used for extra warning flags.
  
  Revision  Changes    Path
  1.57      +3 -3      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- CHANGES	2001/02/09 00:56:03	1.56
  +++ CHANGES	2001/02/09 19:23:05	1.57
  @@ -1,8 +1,8 @@
   Changes with APR b1  
   
  -  *) Added the APR_TRY_GCC_WARNING configure macro for testing a
  -     gcc-specific compile with -Werror) and the APR_CHECK_ICONV_INBUF
  -     macro to test for annoying iconv prototype differences.
  +  *) Added the APR_TRY_COMPILE_NO_WARNING configure macro for testing a
  +     compile with -Werror as well as the APR_CHECK_ICONV_INBUF macro to
  +     test for annoying iconv prototype differences.
        [Jeff Trawick, Roy Fielding]
   
     *) Fix a problem with configure on NetBSD.  We must include sys/types.h
  
  
  
  1.14      +25 -19    apr/apr_common.m4
  
  Index: apr_common.m4
  ===================================================================
  RCS file: /home/cvs/apr/apr_common.m4,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- apr_common.m4	2001/02/09 00:56:04	1.13
  +++ apr_common.m4	2001/02/09 19:23:05	1.14
  @@ -1,29 +1,35 @@
  -dnl APR_TRY_GCC_WARNING(INCLUDES, FUNCTION-BODY,
  +dnl APR_TRY_COMPILE_NO_WARNING(INCLUDES, FUNCTION-BODY,
   dnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
  -AC_DEFUN(APR_TRY_GCC_WARNING,
  -[if test "$GCC" = "yes"; then 
  -  changequote(', ')
  -  cat > conftest.$ac_ext <<EOTEST
  +dnl
  +dnl Tries a compile test with warnings activated so that the result
  +dnl is false if the code doesn't compile cleanly.
  +dnl
  +AC_DEFUN(APR_TRY_COMPILE_NO_WARNING,
  +[if test "x$CFLAGS_WARN" = "x"; then
  +  apr_tcnw_flags=""
  +else
  +  apr_tcnw_flags=$CFLAGS_WARN
  +fi
  +if test "$GCC" = "yes"; then 
  +  apr_tcnw_flags="$apr_tcnw_flags -Werror"
  +fi
  +changequote(', ')
  +cat > conftest.$ac_ext <<EOTEST
   #include "confdefs.h"
   '$1'
   int main(int argc, const char * const argv[]) {
   '$2'
   ; return 0; }
   EOTEST
  -  changequote([, ])
  -  if ${CC-cc} -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
-Werror $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC ; then
  -    ifelse([$3], , :, [rm -rf conftest*
  -    $3])
  -  else
  -    echo "configure: warning on program:" >&AC_FD_CC
  -    cat conftest.$ac_ext >&AC_FD_CC
  -    ifelse([$4], , , [rm -rf conftest*
  -    $4])
  -  fi
  +changequote([, ])
  +if ${CC-cc} -c $CFLAGS $CPPFLAGS $apr_tcnw_flags conftest.$ac_ext 1>&AC_FD_CC ;
then
  +  ifelse([$3], , :, [rm -rf conftest*
  +  $3])
   else
  -    # Not using gcc -- assume everything is okay
  -    ifelse([$3], , :, [rm -rf conftest*
  -    $3])
  +  echo "configure: failed or warning program:" >&AC_FD_CC
  +  cat conftest.$ac_ext >&AC_FD_CC
  +  ifelse([$4], , , [rm -rf conftest*
  +  $4])
   fi
   rm -f conftest*])
   
  @@ -329,7 +335,7 @@
   AC_DEFUN(APR_CHECK_ICONV_INBUF,[
   AC_MSG_CHECKING(for type of inbuf parameter to iconv)
   if test "x$apr_iconv_inbuf_const" = "x"; then
  -    APR_TRY_GCC_WARNING([
  +    APR_TRY_COMPILE_NO_WARNING([
       #include <stddef.h>
       #include <iconv.h>
       ],[
  
  
  

Mime
View raw message