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:
parent
94ec2b6b1c
commit
d84aa5cbc1
14
configure.ac
14
configure.ac
@ -11,7 +11,6 @@ CFLAGS="$CFLAGS -Wall -std=gnu99 -g"
|
|||||||
case $host_os in
|
case $host_os in
|
||||||
*darwin*)
|
*darwin*)
|
||||||
HOST_OS=darwin;
|
HOST_OS=darwin;
|
||||||
LDFLAGS="$LDFLAGS -Qunused-arguments"
|
|
||||||
;;
|
;;
|
||||||
*freebsd*)
|
*freebsd*)
|
||||||
HOST_OS=freebsd;
|
HOST_OS=freebsd;
|
||||||
@ -63,6 +62,19 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
|||||||
)
|
)
|
||||||
CFLAGS="$save_cflags $AM_CFLAGS"
|
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([arc4random_buf asprintf explicit_bzero funopen getauxval])
|
||||||
AC_CHECK_FUNCS([getentropy issetugid memmem reallocarray])
|
AC_CHECK_FUNCS([getentropy issetugid memmem reallocarray])
|
||||||
AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strtonum])
|
AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strtonum])
|
||||||
|
Loading…
Reference in New Issue
Block a user