From e6dbe693b7fd90a495b98ec790205ff4ac56fea9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 11 May 2012 15:52:36 -0400 Subject: Make the option-checker code work with osx clang This is a matter of making gcc and friends squirm more loudly when they get an option they don't like (-pedantic) and making clang shut up with it gets an option it tolerates but doesnt know (-Qunknown-argument). Is there no better way? --- acinclude.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index c482e37546..c5037fa35d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -46,7 +46,7 @@ AC_DEFUN([TOR_CHECK_CFLAGS], [ AS_VAR_PUSHDEF([VAR],[tor_cv_cflags_$1]) AC_CACHE_CHECK([whether the compiler accepts $1], VAR, [ tor_saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" + CFLAGS="$CFLAGS -pedantic $1" AC_TRY_COMPILE([], [return 0;], [AS_VAR_SET(VAR,yes)], [AS_VAR_SET(VAR,no)]) @@ -63,7 +63,7 @@ AC_DEFUN([TOR_CHECK_LDFLAGS], [ AS_VAR_PUSHDEF([VAR],[tor_cv_ldflags_$1]) AC_CACHE_CHECK([whether the linker accepts $1], VAR, [ tor_saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $1" + LDFLAGS="$LDFLAGS -pedantic $1" AC_TRY_LINK([], [return 0;], [AS_VAR_SET(VAR,yes)], [AS_VAR_SET(VAR,no)]) -- cgit v1.2.3-54-g00ecf