diff options
author | Bruce A. Mah <bmah@es.net> | 2014-05-19 15:02:02 -0700 |
---|---|---|
committer | Bruce A. Mah <bmah@es.net> | 2014-05-19 15:02:02 -0700 |
commit | 8de51b589fa0daa00ebfee7a4ec8ee91bc968f7b (patch) | |
tree | 27b4e419ee4226ebae19a9b4f95d97266d4f18f7 /configure.ac | |
parent | 426221a327ce8d37d4e6065d716f01422da4d16b (diff) | |
download | iperf3-8de51b589fa0daa00ebfee7a4ec8ee91bc968f7b.tar.gz |
Portability fixes for Solaris Sun Studio and MacOS.
Only do -Wall by default if on GCC (or something that looks like
GCC, such as clang/llvm).
Turn on -Werror so we can get some better error-checking, but
we also need -Wno-deprecated-declarations at least for MacOS,
because daemon(3) is deprecated starting with MacOS 10.5.
Fixes #174 (I think).
Submitted by: @marksolaris
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4045679..5bbc0dd 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,13 @@ AC_PROG_RANLIB AC_PROG_LN_S AC_PROG_LIBTOOL +# Add -Wall -Werror if we are using GCC. +# We also need -Wno-deprecated-declarations, primarily because on MacOS, daemon(3) +# is deprecated starting from MacOS 10.5. +if test "x$GCC" = "xyes"; then + CFLAGS="$CFLAGS -Wall -Werror -Wno-deprecated-declarations" +fi + # Checks for header files. AC_HEADER_STDC |