--- a/configure.inc
+++ b/configure.inc
@@ -1770,7 +1770,7 @@
 }
 EOF
 
-    if $AC_CC -o config.sed ngc$$.c; then
+    if $BUILD_CC -o config.sed ngc$$.c; then
 	rm -f ngc$$.c
 	__config_files="$__config_files config.sed"
     else
