diff --git a/ChangeLog b/ChangeLog
index 66e9e0120f3dc7effddf3a3674e3db2d1ca2e377..1db2b632a4fdc11626a124e0aa33fd9480fd73de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Apr 23 21:31:16 1998  Jim Wilson  <wilson@cygnus.com>
+
+	* configure: Set CXXFLAGS from CXXFLAGS, not CFLAGS.
+
 Wed Apr 22 12:30:10 1998  Michael Meissner  <meissner@cygnus.com>
 
 	* configure.in (target_makefile_frag): If --enable-target-optspace,
diff --git a/configure b/configure
index 8b4e510d0bf779d15038276683cb6112a1840ba7..f8e6866065ee19555092cd50822927d2b0862cfb 100755
--- a/configure
+++ b/configure
@@ -914,10 +914,10 @@ else
 	echo 'void f(){}' > conftest.c
 	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
 	  CFLAGS=${CFLAGS-"-g -O2"}
-	  CXXFLAGS=${CFLAGS-"-g -O2"}
+	  CXXFLAGS=${CXXFLAGS-"-g -O2"}
 	else
 	  CFLAGS=${CFLAGS-"-O2"}
-	  CXXFLAGS=${CFLAGS-"-O2"}
+	  CXXFLAGS=${CXXFLAGS-"-O2"}
 	fi
 	rm -f conftest*
 	break