[Gridflow-cvs] [svn] commit: r6764 - /trunk/configure

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Apr 18 09:18:37 EDT 2011


Author: matju
Date: Mon Apr 18 09:18:31 2011
New Revision: 6764

Log:
use backslash instead of slash in $0 (programme name) on WINDOWS

Modified:
    trunk/configure

Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Mon Apr 18 09:18:31 2011
@@ -115,6 +115,7 @@
 		File.open(name+".cpp","w") {|f| f.puts code }
 		command = [CXX] + CFLAGS.split(/ /).reject{|x| x.length==0 }
 		raise "gcc compilation error" if not launch *(command+flags+[name+".cpp","-o",name,*link.uniq])
+		name = "tmp\\#{$$}" if WIN
 		raise "runtime error" if not launch name
 		return true
 	ensure
@@ -208,8 +209,10 @@
 #----------------------------------------------------------------#
 Feature.add("gcc3","GNU C++ Compiler 3 (or 4)") {
 	status :always_check
-	action proc {DEFINES["GCC_VERSION"] =
-		begin  /GCC_VERSION\s+(.*)/.match(File.popen("tmp/#{$$}","r"){|f| f.read })[1]
+	action proc {
+		name = WIN ? "tmp\\#{$$}" : "tmp/#{$$}"
+		DEFINES["GCC_VERSION"] =
+		begin  /GCC_VERSION\s+(.*)/.match(File.popen(name,"r"){|f| f.read })[1]
 		rescue Exception; "3.666" # version number unknown, sorry.
 		end
 	}



More information about the Gridflow-cvs mailing list