summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-02-04 12:19:52 -0200
committerHisham Muhammad <hisham@gobolinux.org>2015-02-04 12:19:52 -0200
commitf97d1bc54af13e7c801bf6d83e95661f25695719 (patch)
treec49ef33241f63cb6b6629ade8190951e7779ae63
parentcc269741295610743b50b0d0fa650e79dd2208af (diff)
parentaed9b9d18ebcdeb3d861c26eaf2f46b9616db2aa (diff)
Merge branch 'master' into wip
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac13
2 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index f2540590..844e1b32 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,7 +12,7 @@ applications_DATA = htop.desktop
pixmapdir = $(datadir)/pixmaps
pixmap_DATA = htop.png
-htop_CFLAGS = -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(my_htop_platform)"
+htop_CFLAGS = -pedantic -Wall $(wextra_flag) -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(my_htop_platform)"
AM_CPPFLAGS = -DNDEBUG
myhtopsources = AvailableMetersPanel.c CategoriesPanel.c CheckItem.c \
diff --git a/configure.ac b/configure.ac
index b0801441..a13f7022 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,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

© 2014-2024 Faster IT GmbH | imprint | privacy policy