From 3383d8e5561dfc6fb2b65e0a194df94ccb5e08af Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 21 Jan 2015 23:27:31 -0200 Subject: Sorry about the mega-patch. This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.) --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bc586d99..b0801441 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,8 @@ AC_PREREQ(2.65) AC_INIT([htop],[1.0.3],[hisham@gobolinux.org]) +year=$(date +%Y) + # The following two lines are required by hwloc scripts AC_USE_SYSTEM_EXTENSIONS AC_CANONICAL_TARGET @@ -180,6 +182,8 @@ if test ! -z "$missing_headers"; then AC_MSG_ERROR([missing headers: $missing_headers]) fi +AC_DEFINE_UNQUOTED(COPYRIGHT, "(C) 2004-$year Hisham Muhammad", [Copyright message.]) + # We're done, let's go! # ---------------------------------------------------------------------- AM_CONDITIONAL([HTOP_LINUX], [test "$my_htop_platform" = linux]) -- cgit v1.2.3 From aed9b9d18ebcdeb3d861c26eaf2f46b9616db2aa Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 4 Feb 2015 12:19:04 -0200 Subject: Test if -Wextra is supported. Closes #155. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') 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 -- cgit v1.2.3