INN commit: branches/2.6 (m4/cc-flags.m4 support/getrra-c-util)

INN Commit rra at isc.org
Fri Nov 4 22:41:04 UTC 2016


    Date: Friday, November 4, 2016 @ 15:41:03
  Author: iulius
Revision: 10103

Use cc-flags.m4 from upstream rra-c-util

Modified:
  branches/2.6/m4/cc-flags.m4
  branches/2.6/support/getrra-c-util

-----------------------+
 m4/cc-flags.m4        |   54 +++++++++++++++++++++++++++++++-----------------
 support/getrra-c-util |    9 ++++++++
 2 files changed, 44 insertions(+), 19 deletions(-)

Modified: m4/cc-flags.m4
===================================================================
--- m4/cc-flags.m4	2016-11-04 22:25:33 UTC (rev 10102)
+++ m4/cc-flags.m4	2016-11-04 22:41:03 UTC (rev 10103)
@@ -1,28 +1,44 @@
-dnl cc-flags.m4 -- Checks whether the compiler supports a given flag.
+dnl Check whether the compiler supports particular flags.
 dnl $Id$
 dnl
-dnl Used to check whether a compiler supports a given flag.  If it does, the
-dnl commands in the second argument are run.  If not, the commands in the
-dnl third argument are run.
+dnl Provides INN_PROG_CC_FLAG, which checks whether a compiler supports a
+dnl given flag.  If it does, the commands in the second argument are run.  If
+dnl not, the commands in the third argument are run.
+dnl
+dnl The canonical version of this file is maintained in the rra-c-util
+dnl package, available at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
+dnl
+dnl Copyright 2016 Russ Allbery <eagle at eyrie.org>
+dnl Copyright 2006, 2009, 2016
+dnl     by Internet Systems Consortium, Inc. ("ISC")
+dnl
+dnl Permission to use, copy, modify, and distribute this software for any
+dnl purpose with or without fee is hereby granted, provided that the above
+dnl copyright notice and this permission notice appear in all copies.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+dnl REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+dnl MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY
+dnl SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+dnl IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 dnl Used to build the result cache name.
 AC_DEFUN([_INN_PROG_CC_FLAG_CACHE],
 [translit([inn_cv_compiler_c_$1], [-], [_])])
 
+dnl Check whether a given flag is supported by the complier.
 AC_DEFUN([INN_PROG_CC_FLAG],
 [AC_REQUIRE([AC_PROG_CC])
-AC_MSG_CHECKING([if $CC supports $1])
-AC_CACHE_VAL([_INN_PROG_CC_FLAG_CACHE([$1])],
-[save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $1"
-AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([[]], [[int foo = 0;]])],
-    [_INN_PROG_CC_FLAG_CACHE([$1])=yes],
-    [_INN_PROG_CC_FLAG_CACHE([$1])=no])
-CFLAGS=$save_CFLAGS])
-AC_MSG_RESULT($_INN_PROG_CC_FLAG_CACHE([$1]))
- if test x"$_INN_PROG_CC_FLAG_CACHE([$1])" = xyes ; then
-    ifelse([$2], , :, [$2])
- else
-    ifelse([$3], , :, [$3])
- fi])
+ AC_MSG_CHECKING([if $CC supports $1])
+ AC_CACHE_VAL([_INN_PROG_CC_FLAG_CACHE([$1])],
+    [save_CFLAGS=$CFLAGS
+     CFLAGS="$CFLAGS $1"
+     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [int foo = 0;])],
+        [_INN_PROG_CC_FLAG_CACHE([$1])=yes],
+        [_INN_PROG_CC_FLAG_CACHE([$1])=no])
+     CFLAGS=$save_CFLAGS])
+ AC_MSG_RESULT([$_INN_PROG_CC_FLAG_CACHE([$1])])
+ AS_IF([test x"$_INN_PROG_CC_FLAG_CACHE([$1])" = xyes], [$2], [$3])])
+

Modified: support/getrra-c-util
===================================================================
--- support/getrra-c-util	2016-11-04 22:25:33 UTC (rev 10102)
+++ support/getrra-c-util	2016-11-04 22:41:03 UTC (rev 10103)
@@ -53,6 +53,14 @@
              -e '1 a\
 dnl \$Id\$' \
              ${TEMP}
+
+      # Remove useless function for INN.
+      if [ "$3" = "cc-flags.m4" ]
+      then
+        sed -i -e '/dnl Provides INN_PROG_CC_WARNINGS_FLAGS/,+6d' \
+               -e '/dnl Determine the full set/,$d' \
+             ${TEMP}
+      fi
     elif [ "$2" = "include/inn" ] || [ "$2" = "include/portable" ] \
       || [ "$2" = "include" ] || [ "$2" = "lib" ] || [ "$2" = "tests/lib" ] \
       || [ "$2" = "tests/lib/network" ] || [ "$2" = "tests/tap" ]
@@ -228,6 +236,7 @@
 
 ##  Synchronize Autoconf macros from upstream.
 download m4/bdb.m4 m4 bdb.m4
+download m4/cc-flags.m4 m4 cc-flags.m4
 download m4/inet-ntoa.m4 m4 inet-ntoa.m4
 download m4/krb5-config.m4 m4 krb5-config.m4
 download m4/krb5.m4 m4 krb5.m4



More information about the inn-committers mailing list