+ printf ( "Detecting compiler -pipe support..." );
+
+ string pipe_detection = "tools" + sSep + "rbuild" + sSep + "backend" + sSep + "mingw" + sSep + "pipe_detection.c";
+ string pipe_detectionObjectFilename = ReplaceExtension ( pipe_detection,
+ ".o" );
+ string command = ssprintf (
+ "%s -pipe -c %s -o %s 1>%s 2>%s",
+ FixSeparatorForSystemCommand(compilerCommand).c_str (),
+ pipe_detection.c_str (),
+ pipe_detectionObjectFilename.c_str (),
+ NUL,
+ NUL );
+ int exitcode = system ( command.c_str () );
+ FILE* f = fopen ( pipe_detectionObjectFilename.c_str (), "rb" );
+ if ( f )
+ {
+ usePipe = (exitcode == 0);
+ fclose ( f );
+ unlink ( pipe_detectionObjectFilename.c_str () );
+ }
+ else
+ usePipe = false;
+
+ if ( usePipe )
+ printf ( "detected\n" );
+ else
+ printf ( "not detected\n" );