Permalink
Browse files

Simplify extconf.rb -- this change might break Windows support?

  • Loading branch information...
1 parent 4e2b6e0 commit 5e55a9ccad85aaa8db6c4a995cd7a3bc99e6df86 @matthewd committed May 14, 2010
Showing with 6 additions and 26 deletions.
  1. +6 −26 extconf.rb
View
@@ -1,33 +1,13 @@
require 'mkmf'
require 'pkg-config'
-def find_smjs(mozjs)
- dir_config(mozjs)
- #$CFLAGS += " -gdbg"
- case CONFIG['target_os']
- when /mswin32|mingw|bccwin32/
- $defs << " -DXP_WIN"
- lib = "js32"
- else
- $defs << " -DXP_UNIX"
- lib = mozjs
- end
-
- $defs << " -DNEED_#{mozjs.upcase}_PREFIX"
- have_library(lib)
-end
-
$defs << " -Wall"
-if find_smjs('mozjs') or (CONFIG['target_os'] =~ /mswin32|mingw|bccwin32/ and (find_smjs('mozjs') or find_smjs('smjs'))) or
- %w(xulrunner-js thunderbird-js mozilla-js).any? do |package|
- PKGConfig.have_package(package)
- end
+%w(xulrunner-js thunderbird-js mozilla-js).any? do |package|
+ PKGConfig.have_package(package)
+end
- have_func("JS_SetOperationCallback")
- have_func("JS_SetBranchCallback")
+have_func("JS_SetOperationCallback")
+have_func("JS_SetBranchCallback")
- create_makefile("spidermonkey")
-else
- exit 1
-end
+create_makefile("spidermonkey")

0 comments on commit 5e55a9c

Please sign in to comment.