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
This commit is contained in:
parent
426221a327
commit
8de51b589f
|
@ -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
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
noinst_PROGRAMS = mic mis # Build, but don't install
|
||||
|
||||
mic_SOURCES = mic.c
|
||||
mic_CFLAGS = -g -Wall
|
||||
mic_CFLAGS = -g
|
||||
mic_LDADD = ../src/libiperf.la
|
||||
mic_LDFLAGS = -g
|
||||
|
||||
mis_SOURCES = mis.c
|
||||
mis_CFLAGS = -g -Wall
|
||||
mis_CFLAGS = -g
|
||||
mis_LDADD = ../src/libiperf.la
|
||||
mis_LDFLAGS = -g
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ libiperf_la_SOURCES = \
|
|||
|
||||
# Specify the sources and various flags for the iperf binary
|
||||
iperf3_SOURCES = main.c
|
||||
iperf3_CFLAGS = -g -Wall
|
||||
iperf3_CFLAGS = -g
|
||||
iperf3_LDADD = libiperf.la
|
||||
iperf3_LDFLAGS = -g
|
||||
|
||||
|
@ -48,23 +48,23 @@ iperf3_LDFLAGS = -g
|
|||
iperf3_profile_SOURCES = main.c \
|
||||
$(libiperf_la_SOURCES)
|
||||
|
||||
iperf3_profile_CFLAGS = -pg -g -Wall
|
||||
iperf3_profile_CFLAGS = -pg -g
|
||||
iperf3_profile_LDADD = libiperf.la
|
||||
iperf3_profile_LDFLAGS = -pg -g
|
||||
|
||||
# Specify the sources and various flags for the test cases
|
||||
t_timer_SOURCES = t_timer.c
|
||||
t_timer_CFLAGS = -g -Wall
|
||||
t_timer_CFLAGS = -g
|
||||
t_timer_LDFLAGS =
|
||||
t_timer_LDADD = libiperf.la
|
||||
|
||||
t_units_SOURCES = t_units.c
|
||||
t_units_CFLAGS = -g -Wall
|
||||
t_units_CFLAGS = -g
|
||||
t_units_LDFLAGS =
|
||||
t_units_LDADD = libiperf.la
|
||||
|
||||
t_uuid_SOURCES = t_uuid.c
|
||||
t_uuid_CFLAGS = -g -Wall
|
||||
t_uuid_CFLAGS = -g
|
||||
t_uuid_LDFLAGS =
|
||||
t_uuid_LDADD = libiperf.la
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user