[cpp-log4shib] 11/17: Don't change the C(XX)FLAGS provided by the user
Scott Cantor
cantor.2 at osu.edu
Mon Jun 25 10:18:22 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-log4shib.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-log4shib.git;a=commit;h=3e78c1c413c1058c16b478cfa021789e7e5cac20
commit 3e78c1c413c1058c16b478cfa021789e7e5cac20
Author: Ferenc Wágner <wferi at debian.org>
AuthorDate: Mon Jun 25 10:22:40 2018 +0200
Don't change the C(XX)FLAGS provided by the user
This reveals a couple of unused-parameter warnings.
---
configure.ac | 21 +++++++++++----------
m4/PETI_PEDANTIC_GCC.m4 | 33 ---------------------------------
2 files changed, 11 insertions(+), 43 deletions(-)
diff --git a/configure.ac b/configure.ac
index 422a0e7..6fd7177 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,11 +35,11 @@ AC_ARG_ENABLE(debug,
enable_debug=$enableval, enable_debug=no)
if test "$enable_debug" = "yes" ; then
- GCC_CFLAGS="$CFLAGS -g -D_DEBUG"
- GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG"
+ AM_CFLAGS="-g -D_DEBUG"
+ AM_CXXFLAGS="-g -D_DEBUG"
else
- GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG"
- GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
+ AM_CFLAGS="-O2 -DNDEBUG"
+ AM_CXXFLAGS="-O2 -DNDEBUG"
fi
AM_PROG_LIBTOOL
@@ -49,8 +49,8 @@ AC_PROG_MAKE_SET
AC_PROG_CXX([g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC QCC])
if test "$GCC" = "yes" ; then
- CFLAGS="-Wall $GCC_CFLAGS"
- CXXFLAGS="-Wall $GCC_CXXFLAGS"
+ AM_CFLAGS="$AM_CFLAGS -Wall -W"
+ AM_CXXFLAGS="$AM_CXXFLAGS -Wall -W"
fi
AC_PROG_CXXCPP
@@ -107,11 +107,14 @@ else
AC_DEFINE(USE_PTHREADS,1,[define if pthread library is available])
AC_DEFINE(_PTHREADS,1,[define for STL if pthread library is used])
LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
- CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
+ AM_CFLAGS="$PTHREAD_CFLAGS $AM_CFLAGS"
+ AM_CXXFLAGS="$PTHREAD_CFLAGS $AM_CXXFLAGS"
CC="$PTHREAD_CC"
fi
+AC_SUBST([AM_CFLAGS])
+AC_SUBST([AM_CXXFLAGS])
+
AC_LANG(C++)
AC_CXX_HAVE_SSTREAM
@@ -128,8 +131,6 @@ fi
# ----------------------------------------------------------------------------
BB_ENABLE_DOXYGEN
-PETI_PEDANTIC_GCC
-
# Create files
# ----------------------------------------------------------------------------
diff --git a/m4/PETI_PEDANTIC_GCC.m4 b/m4/PETI_PEDANTIC_GCC.m4
deleted file mode 100644
index 5c64eaa..0000000
--- a/m4/PETI_PEDANTIC_GCC.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-dnl @synopsis PETI_PEDANTIC_GCC
-dnl
-dnl For development purposes, it is desirable to have autoconf
-dnl automatically enable warnings when compiling C or C++ sources. In
-dnl case the underlying compiler is a gcc, the appropriate flags are
-dnl "-Wall -pedantic". This macro will add them to $CFLAGS and
-dnl $CXXFLAGS if $CC is found to be a gcc.
-dnl
-dnl @author Peter Simons <simons at computer.org>
-dnl original version: peti_pedantic_gcc.m4,v 1.4 2000/12/31 10:18:09 simons
-dnl @version $Id: PETI_PEDANTIC_GCC.m4,v 1.4 2002/09/15 22:40:50 bastiaan Exp $
-
-AC_DEFUN([PETI_PEDANTIC_GCC],
- [
- if test "$GCC" = yes; then
- if test "$host" = x86-pc-nto-qnx; then
- CFLAGS="$CXXFLAGS -Wno-unused -O0"
- CXXFLAGS="$CXXFLAGS -Wno-unused -DLOG4SHIB_MISSING_INT64_OSTREAM_OP -O0"
- else
- case `$CXX --version` in
- *2.97*) CFLAGS="$CFLAGS -Wall -Wno-unused -pedantic -D_ISOC99_SOURCE"
- CXXFLAGS="$CXXFLAGS -Wall -Wno-unused -pedantic -D_ISOC99_SOURCE"
- ;;
- *2.96*) CFLAGS="$CFLAGS -Wall -Wno-unused"
- CXXFLAGS="$CXXFLAGS -Wall -Wno-unused"
- ;;
- *) CFLAGS="$CFLAGS -Wall -Wno-unused -pedantic"
- CXXFLAGS="$CXXFLAGS -Wall -Wno-unused -pedantic"
- ;;
- esac
- fi
- fi
- ])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list