Quiet clang warnings about unused arguments in general.

Check if we are using clang, rather than simply if we are on OS X.
Note: recent LLVM releases do not seem to need this anyway.
This commit is contained in:
Brent Cook 2014-11-03 21:06:40 -06:00
parent 94ec2b6b1c
commit d84aa5cbc1

View File

@ -11,7 +11,6 @@ CFLAGS="$CFLAGS -Wall -std=gnu99 -g"
case $host_os in
*darwin*)
HOST_OS=darwin;
LDFLAGS="$LDFLAGS -Qunused-arguments"
;;
*freebsd*)
HOST_OS=freebsd;
@ -63,6 +62,19 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
)
CFLAGS="$save_cflags $AM_CFLAGS"
AC_MSG_CHECKING([if compiling with clang])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
#ifndef __clang__
not clang
#endif
]])],
[AC_MSG_RESULT([yes])]
[CLANG_FLAGS=-Qunused-arguments],
[AC_MSG_RESULT([no])]
)
CFLAGS="$CFLAGS $CLANG_CFLAGS"
LDFLAGS="$LDFLAGS $CLANG_FLAGS"
AC_CHECK_FUNCS([arc4random_buf asprintf explicit_bzero funopen getauxval])
AC_CHECK_FUNCS([getentropy issetugid memmem reallocarray])
AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strtonum])