Commits

Greg Ward committed fd00932

Put CC, CFLAGS, etc. under the control of configure.

  • Participants
  • Parent commits 843914d

Comments (0)

Files changed (2)

-CFLAGS = -Wall -Wextra -Wno-unused-parameter -std=gnu99 -g
-LDFLAGS = -g
+CC = @CC@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 
 headers = $(wildcard src/*.h) config.h

File configure.ac

 
 # Checks for programs.
 AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_MAKE_SET
 
+# crank up the warnings if building with GCC
+if echo $CC | grep gcc; then
+    CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
+fi
+
 # Checks for header files.
 AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/time.h unistd.h])