[Fxruby-commits] CVS: FXRuby/ext/fox extconf.rb,1.27.2.2,1.27.2.3 extconf.rb.in,1.1.2.1,1.1.2.2
Status: Inactive
Brought to you by:
lyle
|
From: Lyle J. <ly...@us...> - 2002-05-10 21:30:42
|
Update of /cvsroot/fxruby/FXRuby/ext/fox
In directory usw-pr-cvs1:/tmp/cvs-serv27731
Modified Files:
Tag: release10
extconf.rb extconf.rb.in
Log Message:
Various cleanups for the extconf.rb script, mainly to support searching
multiple default directories to auto-detect the location of FOX.
Index: extconf.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/ext/fox/extconf.rb,v
retrieving revision 1.27.2.2
retrieving revision 1.27.2.3
diff -C2 -d -r1.27.2.2 -r1.27.2.3
*** extconf.rb 6 May 2002 15:58:52 -0000 1.27.2.2
--- extconf.rb 10 May 2002 21:30:39 -0000 1.27.2.3
***************
*** 4,41 ****
require 'mkmf'
def getInstalledFOXVersion
! incdir = "/usr/local/include/fox"
! ARGV.each { |arg|
if arg =~ /--with-fox-include/
! incdir = arg.split('=')[1]
end
! }
! filename = File.join(incdir, "fxver.h")
! if FileTest.exists?(filename)
! foxMajor, foxMinor, foxLevel = nil, nil, nil
! File.foreach(filename) { |line|
! if line =~ /FOX_MAJOR/
! foxMajor = line.split()[2]
! elsif line =~ /FOX_MINOR/
! foxMinor = line.split()[2]
! elsif line =~ /FOX_LEVEL/
! foxLevel = line.split()[2]
! end
! }
! if foxMajor && foxMinor && foxLevel
! return foxMajor + "." + foxMinor + "." + foxLevel
! else
! return ""
end
! else
! puts "I couldn't locate the standard FOX header file \"fxver.h\" at this location:"
! puts ""
! puts " #{filename}"
! puts ""
! puts "Please specify the locations for the FOX header files and library using the"
! puts "--with-fox-include and --with-fox-lib options to extconf.rb as described in"
! puts "the FXRuby installation instructions."
! exit
! end
end
--- 4,51 ----
require 'mkmf'
+ def read_fox_version(filename)
+ foxMajor, foxMinor, foxLevel = nil, nil, nil
+ File.foreach(filename) do |line|
+ if line =~ /FOX_MAJOR/
+ foxMajor = line.split()[2]
+ elsif line =~ /FOX_MINOR/
+ foxMinor = line.split()[2]
+ elsif line =~ /FOX_LEVEL/
+ foxLevel = line.split()[2]
+ end
+ end
+ [foxMajor, foxMinor, foxLevel]
+ end
+
def getInstalledFOXVersion
! # incdirs is an array of directories that we'll search (in order)
! # looking for the FOX header files
! incdirs = ["/usr/include/fox", "/usr/local/include/fox"]
! ARGV.each do |arg|
if arg =~ /--with-fox-include/
! option, value = arg.split('=')
! incdirs = [ value ] + incdirs
end
! end
!
! incdirs.each do |incdir|
! filename = File.join(incdir, "fxver.h")
! if FileTest.exists?(filename)
! foxMajor, foxMinor, foxLevel = read_fox_version(filename)
! idircflag = "-I" + incdir
! $CPPFLAGS += " " + idircflag unless $CPPFLAGS.split.include?(idircflag)
! return [foxMajor, foxMinor, foxLevel].join('.')
end
! end
!
! # Couldn't find it
! puts "I couldn't locate \"fxver.h\" in any of the following directories:"
! puts ""
! incdirs.each { |incdir| puts " #{incdir}" }
! puts ""
! puts "Please specify the locations for the FOX header files and library using the"
! puts "--with-fox-include and --with-fox-lib options to extconf.rb as described in"
! puts "the FXRuby installation instructions."
! exit
end
***************
*** 47,51 ****
# This directive processes the "--with-fox-include" and "--with-fox-lib"
# command line switches and modifies the CFLAGS and LDFLAGS accordingly.
! dir_config('fox', '/usr/local/include/fox', '/usr/local/lib')
# This directive processes the "--with-scintilla-include" and
--- 57,61 ----
# This directive processes the "--with-fox-include" and "--with-fox-lib"
# command line switches and modifies the CFLAGS and LDFLAGS accordingly.
! dir_config('fox', nil, '/usr/local/lib')
# This directive processes the "--with-scintilla-include" and
***************
*** 55,61 ****
# Verify version number for FOX from the installed header files
! installedVer = getInstalledFOXVersion().split('.')
! thisVer = "1.0.10".split('.')
! if (installedVer[0] != thisVer[0]) || (installedVer[1] != thisVer[1])
puts "The version number for this installation of FOX appears to be inconsistent"
puts "with this release of FXRuby (1.0.10)."
--- 65,71 ----
# Verify version number for FOX from the installed header files
! instMajor, instMinor, instLevel = getInstalledFOXVersion().split('.')
! thisMajor, thisMinor, thisLevel = "1.0.10".split('.')
! unless (instMajor == thisMajor) && (instMinor == thisMinor)
puts "The version number for this installation of FOX appears to be inconsistent"
puts "with this release of FXRuby (1.0.10)."
Index: extconf.rb.in
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/ext/fox/Attic/extconf.rb.in,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** extconf.rb.in 10 May 2002 05:04:01 -0000 1.1.2.1
--- extconf.rb.in 10 May 2002 21:30:39 -0000 1.1.2.2
***************
*** 4,41 ****
require 'mkmf'
def getInstalledFOXVersion
! incdir = "/usr/local/include/fox"
! ARGV.each { |arg|
if arg =~ /--with-fox-include/
! incdir = arg.split('=')[1]
end
! }
! filename = File.join(incdir, "fxver.h")
! if FileTest.exists?(filename)
! foxMajor, foxMinor, foxLevel = nil, nil, nil
! File.foreach(filename) { |line|
! if line =~ /FOX_MAJOR/
! foxMajor = line.split()[2]
! elsif line =~ /FOX_MINOR/
! foxMinor = line.split()[2]
! elsif line =~ /FOX_LEVEL/
! foxLevel = line.split()[2]
! end
! }
! if foxMajor && foxMinor && foxLevel
! return foxMajor + "." + foxMinor + "." + foxLevel
! else
! return ""
end
! else
! puts "I couldn't locate the standard FOX header file \"fxver.h\" at this location:"
! puts ""
! puts " #{filename}"
! puts ""
! puts "Please specify the locations for the FOX header files and library using the"
! puts "--with-fox-include and --with-fox-lib options to extconf.rb as described in"
! puts "the FXRuby installation instructions."
! exit
! end
end
--- 4,51 ----
require 'mkmf'
+ def read_fox_version(filename)
+ foxMajor, foxMinor, foxLevel = nil, nil, nil
+ File.foreach(filename) do |line|
+ if line =~ /FOX_MAJOR/
+ foxMajor = line.split()[2]
+ elsif line =~ /FOX_MINOR/
+ foxMinor = line.split()[2]
+ elsif line =~ /FOX_LEVEL/
+ foxLevel = line.split()[2]
+ end
+ end
+ [foxMajor, foxMinor, foxLevel]
+ end
+
def getInstalledFOXVersion
! # incdirs is an array of directories that we'll search (in order)
! # looking for the FOX header files
! incdirs = ["/usr/include/fox", "/usr/local/include/fox"]
! ARGV.each do |arg|
if arg =~ /--with-fox-include/
! option, value = arg.split('=')
! incdirs = [ value ] + incdirs
end
! end
!
! incdirs.each do |incdir|
! filename = File.join(incdir, "fxver.h")
! if FileTest.exists?(filename)
! foxMajor, foxMinor, foxLevel = read_fox_version(filename)
! idircflag = "-I" + incdir
! $CPPFLAGS += " " + idircflag unless $CPPFLAGS.split.include?(idircflag)
! return [foxMajor, foxMinor, foxLevel].join('.')
end
! end
!
! # Couldn't find it
! puts "I couldn't locate \"fxver.h\" in any of the following directories:"
! puts ""
! incdirs.each { |incdir| puts " #{incdir}" }
! puts ""
! puts "Please specify the locations for the FOX header files and library using the"
! puts "--with-fox-include and --with-fox-lib options to extconf.rb as described in"
! puts "the FXRuby installation instructions."
! exit
end
***************
*** 47,51 ****
# This directive processes the "--with-fox-include" and "--with-fox-lib"
# command line switches and modifies the CFLAGS and LDFLAGS accordingly.
! dir_config('fox', '/usr/local/include/fox', '/usr/local/lib')
# This directive processes the "--with-scintilla-include" and
--- 57,61 ----
# This directive processes the "--with-fox-include" and "--with-fox-lib"
# command line switches and modifies the CFLAGS and LDFLAGS accordingly.
! dir_config('fox', nil, '/usr/local/lib')
# This directive processes the "--with-scintilla-include" and
***************
*** 55,61 ****
# Verify version number for FOX from the installed header files
! installedVer = getInstalledFOXVersion().split('.')
! thisVer = "@@FOX_VERSION@@".split('.')
! if (installedVer[0] != thisVer[0]) || (installedVer[1] != thisVer[1])
puts "The version number for this installation of FOX appears to be inconsistent"
puts "with this release of FXRuby (@@FXRUBY_VERSION@@)."
--- 65,71 ----
# Verify version number for FOX from the installed header files
! instMajor, instMinor, instLevel = getInstalledFOXVersion().split('.')
! thisMajor, thisMinor, thisLevel = "@@FOX_VERSION@@".split('.')
! unless (instMajor == thisMajor) && (instMinor == thisMinor)
puts "The version number for this installation of FOX appears to be inconsistent"
puts "with this release of FXRuby (@@FXRUBY_VERSION@@)."
|