commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/geas configure.in


From: Daniel E. Baumann
Subject: gnue/geas configure.in
Date: Tue, 05 Jun 2001 22:17:23 -0700

CVSROOT:        /cvs
Module name:    gnue
Changes by:     Daniel E. Baumann <address@hidden>      01/06/05 22:17:23

Modified files:
        geas           : configure.in 

Log message:
        Add macro for more warnings option and checks (shamelessly stolen from 
nautilus ;)).
        Now you can turn them off with --enable-more-warnings=no, but I 
wouldn't recommend
        it if you are coding as then you may be prone to physical abuse by 
other developers
        ;).

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/configure.in.diff?cvsroot=OldCVS&tr1=1.27&tr2=1.28&r1=text&r2=text

Patches:
Index: gnue/geas/configure.in
diff -u gnue/geas/configure.in:1.27 gnue/geas/configure.in:1.28
--- gnue/geas/configure.in:1.27 Tue Jun  5 13:32:35 2001
+++ gnue/geas/configure.in      Tue Jun  5 22:17:22 2001
@@ -19,9 +19,9 @@
 AC_PROG_LN_S
 
 dnl Enable more compiler warnings.
-if test "$GCC"; then
-    CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
-fi
+dnl if test "$GCC"; then
+dnl    CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
+dnl fi
 
 dnl Checks for header files.
 AC_HEADER_STDC
@@ -329,6 +329,49 @@
 
 idldir="\${prefix}/share/idl"
 ORBIT_IDL_MAKE_SKELETON_FLAGS="--skeleton-impl"
+
+dnl Turn on the additional warnings last, so -Werror doesn't affect other 
tests.
+
+AC_ARG_ENABLE(more-warnings,
+[  --enable-more-warnings  Maximum compiler warnings],
+set_more_warnings="$enableval",[
+if test -f $srcdir/CVSVERSION; then
+       is_cvs_version=true
+       set_more_warnings=yes
+else
+       set_more_warnings=no
+fi
+])
+AC_MSG_CHECKING(for more warnings, including -Werror)
+if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
+       AC_MSG_RESULT(yes)
+       CFLAGS="\
+       -Wall \
+       -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
+       -Wnested-externs -Wpointer-arith \
+       -Wcast-align -Wsign-compare \
+       -Werror \
+       $CFLAGS"
+
+       for option in -Wsign-promo -Wno-sign-compare; do
+               SAVE_CFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS $option"
+               AC_MSG_CHECKING([whether gcc understands $option])
+               AC_TRY_COMPILE([], [],
+                       has_option=yes,
+                       has_option=no,)
+               CFLAGS="$SAVE_CFLAGS"
+               if test $has_option = yes; then
+                 CFLAGS="$CFLAGS $option"
+               fi
+               AC_MSG_RESULT($has_option)
+               unset has_option
+               unset SAVE_CFLAGS
+       done
+       unset option
+else
+       AC_MSG_RESULT(no)
+fi
 
 AC_SUBST(idldir)
 AC_SUBST(ORBIT_IDL)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]