diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-02-04 12:19:04 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-02-04 12:19:04 -0200 |
commit | aed9b9d18ebcdeb3d861c26eaf2f46b9616db2aa (patch) | |
tree | ad094bebe88b34a25e90068322df87a24ea4e8e8 /configure.ac | |
parent | 83a829a286ae3efe0647a235bcc8db7b6d53d11a (diff) |
Test if -Wextra is supported. Closes #155.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index bc586d99..a952d5ea 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,19 @@ AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [char *a; a = strdup("foo"); int i = 0; i++; AC_MSG_ERROR([htop is written in C99. A newer version of gcc is required.])) CFLAGS="$save_cflags" +save_cflags="${CFLAGS}" +CFLAGS="$CFLAGS -Wextra" +AC_MSG_CHECKING([if compiler supports -Wextra]) +AC_TRY_COMPILE([], [], [ + wextra_flag=-Wextra + AC_MSG_RESULT([yes]) +],[ + wextra_flag= + AC_MSG_RESULT([no]) +]) +CFLAGS="$save_cflags" +AC_SUBST(wextra_flag) + # Checks for features and flags. # ---------------------------------------------------------------------- PROCDIR=/proc |