Only use -Wall and gcc-only flags with gcc.

2005-12-28  Tollef Fog Heen  <tfheen@err.no>

	* configure.in, Makefile.am: Only use -Wall and other gcc-only
	flags when we don't have a set of CFLAGS already set and we're
	using gcc.  Freedesktop #4888.
This commit is contained in:
Tollef Fog Heen 2005-12-28 14:07:04 +00:00
parent 712f0af7b8
commit 4f78f8cf50
3 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2005-12-28 Tollef Fog Heen <tfheen@err.no>
* configure.in, Makefile.am: Only use -Wall and other gcc-only
flags when we don't have a set of CFLAGS already set and we're
using gcc. Freedesktop #4888.
2005-10-17 Tollef Fog Heen <tfheen@err.no>
* pkg.m4: Do AC_MSG_RESULT([no]) even if $4 is set (so we don't

View file

@ -14,7 +14,7 @@ man_MANS = pkg-config.1
EXTRA_DIST = $(m4_DATA) $(man_MANS) README.win32
bin_PROGRAMS = pkg-config
AM_CFLAGS=-g -Wall -O2
AM_CFLAGS=@WARN_CFLAGS@
INCLUDES=-DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" $(included_glib_includes)

View file

@ -58,6 +58,16 @@ or auto])
esac
AC_MSG_RESULT($use_indirect_deps)
#
# Choose default CFLAGS and warnings depending on compiler.
#
WARN_CFLAGS=""
if test "${GCC}" = "yes" && test "${ac_env_CFLAGS_set}" != "set"; then
WARN_CFLAGS="-g -Wall -O2"
fi
AC_SUBST(WARN_CFLAGS)
AC_DEFINE_UNQUOTED(ENABLE_INDIRECT_DEPS, `test $use_indirect_deps = no; echo $?`, [Link library to all dependent libraries, not only directly needed ones])
AC_MSG_CHECKING([for Win32])