summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 328833d0..56608145 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
@@ -71,6 +73,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
@@ -187,6 +202,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])