oaf, gcc-2.7.2



I am committing the following patch to cvs oaf.  It makes oaf
check that gcc understands the options oaf wants.  gcc-2.7.2 --
which is what you use if you want to purify -- lacks a few.

Still, with -Werror you won't get long, but that is a different
problem not addressed here.

mjs approved the basic idea of the patch.

Morten


Caution!  Cut-and-paste via X.


Index: configure.in
===================================================================
RCS file: /cvs/gnome/oaf/configure.in,v
retrieving revision 1.41
diff -u -r1.41 configure.in
--- configure.in        2000/09/29 04:53:01     1.41
+++ configure.in        2000/10/12 15:19:51
@@ -148,9 +148,25 @@
        -Wall \
        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
        -Wnested-externs -Wpointer-arith \
-       -Wno-sign-compare -Wsign-promo \
        -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([], [int test;],
+                       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
 fi
 
 AC_OUTPUT([




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