Commit 3e78c1c4 authored by Ferenc Wágner's avatar Ferenc Wágner
Browse files

Don't change the C(XX)FLAGS provided by the user

This reveals a couple of unused-parameter warnings.
parent bc567b77
......@@ -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
# ----------------------------------------------------------------------------
......
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@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
])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment