diff options
author | Ken Raeburn <raeburn@mit.edu> | 2007-08-23 07:11:21 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2007-08-23 07:11:21 +0000 |
commit | 1ba85a1abdc293f48583f136bc3a6d60025bca69 (patch) | |
tree | ea95036d1760a93f210d83f474b301c66f6a8554 /src | |
parent | 8b1e4ce908c8d106f49fc0deffa8fbf8c5633dd6 (diff) | |
download | krb5-1ba85a1abdc293f48583f136bc3a6d60025bca69.tar.gz krb5-1ba85a1abdc293f48583f136bc3a6d60025bca69.tar.xz krb5-1ba85a1abdc293f48583f136bc3a6d60025bca69.zip |
Use -Wno-format-zero-length if GCC version supports it
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19848 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/aclocal.m4 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 8cdbc47888..f29446a1fe 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -625,6 +625,19 @@ if test "$GCC" = yes ; then else CFLAGS="$CFLAGS -pedantic" fi + AC_CACHE_CHECK([if GCC supports -Wno-format-zero-length], + krb5_cv_gcc_Wno_format_zero_length, + [# first try without, then with + AC_TRY_COMPILE([], 1;, + [old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-format-zero-length" + AC_TRY_COMPILE([], 1;, krb5_cv_gcc_Wno_format_zero_length=yes, + krb5_cv_gcc_Wno_format_zero_length=no) + CFLAGS="$old_cflags"], + [AC_MSG_ERROR(compiling simple test program with $CFLAGS failed)])]) + if test "$krb5_cv_gcc_Wno_format_zero_length" = yes; then + CFLAGS="$CFLAGS -Wno-format-zero-length" + fi fi if test "`uname -s`" = Darwin ; then # Someday this should be a feature test. |