From f490102454f8330cd67e8f5d1586ab973bf54966 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 16 Mar 2008 21:49:19 -0700 Subject: [PATCH] If we're not compiling one or more major options (ACLs, xattrs, & iconv), try to turn off unused-parameter compiler warnings. --- configure.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.in b/configure.in index 8ad96c27..be737096 100644 --- a/configure.in +++ b/configure.in @@ -958,6 +958,17 @@ else esac fi +if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"$enable_iconv" = x"no"; then + AC_MSG_CHECKING([whether $CC supports -Wno-unused-parameter]) + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wno-unused-parameter" + AC_COMPILE_IFELSE([ ], [rsync_warn_flag=yes], [rsync_warn_flag=no]) + AC_MSG_RESULT([$rsync_warn_flag]) + if test x"$rsync_warn_flag" = x"no"; then + CFLAGS="$OLD_CFLAGS" + fi +fi + AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) AC_OUTPUT -- 2.34.1