[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp configure.ac acinclude.m4 ChangeLog
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp configure.ac acinclude.m4 ChangeLog |
Date: |
Thu, 30 Mar 2006 23:51:01 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Branch:
Changes by: Ben Pfaff <address@hidden> 06/03/30 23:51:01
Modified files:
. : configure.ac acinclude.m4 ChangeLog
Log message:
Use -Wdeclaration-after-statement if available.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/configure.ac.diff?tr1=1.41&tr2=1.42&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/acinclude.m4.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/ChangeLog.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
Patches:
Index: pspp/ChangeLog
diff -u pspp/ChangeLog:1.47 pspp/ChangeLog:1.48
--- pspp/ChangeLog:1.47 Tue Mar 21 00:33:05 2006
+++ pspp/ChangeLog Thu Mar 30 23:51:01 2006
@@ -1,3 +1,11 @@
+Thu Mar 30 15:50:05 2006 Ben Pfaff <address@hidden>
+
+ * Smake: Enable -Wdeclaration-after-statement warning if
+ available.
+
+ * acinclude.m4: Add macro for checking whether a warning is
+ supported.
+
Mon Mar 20 16:32:11 2006 Ben Pfaff <address@hidden>
* Smake: Require "unistd" gnulib module. Removed tests for
Index: pspp/acinclude.m4
diff -u pspp/acinclude.m4:1.5 pspp/acinclude.m4:1.6
--- pspp/acinclude.m4:1.5 Sat Mar 4 20:38:51 2006
+++ pspp/acinclude.m4 Thu Mar 30 23:51:01 2006
@@ -3,6 +3,22 @@
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl Check whether a warning flag is accepted.
+dnl If so, add it to CFLAGS.
+dnl Example: PSPP_ENABLE_WARNING(-Wdeclaration-after-statement)
+AC_DEFUN([PSPP_ENABLE_WARNING],
+[
+ m4_define([pspp_cv_name], [pspp_cv_[]m4_translit([$1], [-], [_])])dnl
+ AC_CACHE_CHECK([whether $CC accepts $1], [pspp_cv_name],
+ [pspp_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)], [pspp_cv_name[]=yes],
[pspp_cv_name[]=no])
+ CFLAGS="$pspp_save_CFLAGS"])
+ if test $pspp_cv_name = yes; then
+ CFLAGS="$CFLAGS $1"
+ fi
+])
+
dnl Check for readline and history libraries.
dnl Modified for PSPP by Ben Pfaff, based on readline.m4 serial 3 from
Index: pspp/configure.ac
diff -u pspp/configure.ac:1.41 pspp/configure.ac:1.42
--- pspp/configure.ac:1.41 Fri Mar 17 00:41:57 2006
+++ pspp/configure.ac Thu Mar 30 23:51:01 2006
@@ -1,4 +1,4 @@
-0dnl Process this file with autoconf to produce a configure script.
+dnl Process this file with autoconf to produce a configure script.
dnl Initialize.
AX_PREREQ(2.57)
@@ -13,6 +13,8 @@
AC_PROG_RANLIB
gl_EARLY
+PSPP_ENABLE_WARNING(-Wdeclaration-after-statement)
+
AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp configure.ac acinclude.m4 ChangeLog,
Ben Pfaff <=