--- config_office/configure.in.old	2007-11-22 11:59:37.000000000 +0100
+++ config_office/configure.in	2007-11-22 16:48:31.000000000 +0100
@@ -2655,10 +2655,10 @@ if test "$SOLAR_JAVA" != ""; then
    # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
    # A workaround is to link also against libpmawt.so
    if test "$JDK" = "ibm" ; then
-      save_CFLAGS=$CFLAGS
+      save_CPPFLAGS=$CPPFLAGS
       save_LDFLAGS=$LDFLAGS
       save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
-      CFLAGS="$CFLAGS -I$JAVA_HOME/include"
+      CPPFLAGS="$CPPFLAGS -I$JAVA_HOME/include"
       LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
       LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
       export LD_LIBRARY_PATH
@@ -2671,7 +2671,7 @@ if test "$SOLAR_JAVA" != ""; then
          AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
       fi
       exec 6>&1 # output on again
-      CFLAGS=$save_CFLAGS
+      CPPFLAGS=$save_CPPFLAGS
       LDFLAGS=$save_LDFLAGS
       LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
    fi
