* configure.ac, Makefile.am: Test if GCC accepts -Wno-pointer-sign
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@878 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
56bf53abd5
commit
01f1430e8b
|
@ -1,3 +1,7 @@
|
||||||
|
2009-11-04 Michal Ludvig <mludvig@logix.net.nz>
|
||||||
|
|
||||||
|
* configure.ac, Makefile.am: Test if GCC accepts -Wno-pointer-sign
|
||||||
|
|
||||||
2009-11-04 Michal Ludvig <mludvig@logix.net.nz>
|
2009-11-04 Michal Ludvig <mludvig@logix.net.nz>
|
||||||
|
|
||||||
* buspirate.c: Implemented 'BinMode' support for
|
* buspirate.c: Implemented 'BinMode' support for
|
||||||
|
|
|
@ -51,7 +51,7 @@ libavrdude_a_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\"
|
||||||
|
|
||||||
avrdude_CFLAGS = @ENABLE_WARNINGS@
|
avrdude_CFLAGS = @ENABLE_WARNINGS@
|
||||||
|
|
||||||
libavrdude_a_CFLAGS = @ENABLE_WARNINGS@ -Wno-sign-compare -Wno-sign-conversion -Wno-pointer-sign
|
libavrdude_a_CFLAGS = @ENABLE_WARNINGS@
|
||||||
|
|
||||||
avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB@ @LIBHID@ -lm
|
avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB@ @LIBHID@ -lm
|
||||||
|
|
||||||
|
|
19
configure.ac
19
configure.ac
|
@ -254,6 +254,25 @@ AC_SUBST(WINDOWS_DIRS,$WINDOWS_DIRS)
|
||||||
# If we are compiling with gcc, enable all warning and make warnings errors.
|
# If we are compiling with gcc, enable all warning and make warnings errors.
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
ENABLE_WARNINGS="-Wall"
|
ENABLE_WARNINGS="-Wall"
|
||||||
|
|
||||||
|
# does this compiler support -Wno-pointer-sign ?
|
||||||
|
AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign ])
|
||||||
|
|
||||||
|
safe_CFLAGS=$CFLAGS
|
||||||
|
CFLAGS="$ENABLE_WARNINGS -Wno-pointer-sign"
|
||||||
|
|
||||||
|
AC_TRY_COMPILE(, [ int main () { return 0 ; } ], [
|
||||||
|
no_pointer_sign=yes
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
], [
|
||||||
|
no_pointer_sign=no
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
CFLAGS=$safe_CFLAGS
|
||||||
|
|
||||||
|
if test x$no_pointer_sign = xyes; then
|
||||||
|
ENABLE_WARNINGS="$ENABLE_WARNINGS -Wno-pointer-sign"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST(ENABLE_WARNINGS,$ENABLE_WARNINGS)
|
AC_SUBST(ENABLE_WARNINGS,$ENABLE_WARNINGS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue