passenger 5.0.7 → 5.0.8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/CHANGELOG +17 -0
- data/bin/passenger-install-apache2-module +37 -5
- data/build/basics.rb +4 -1
- data/build/integration_tests.rb +6 -3
- data/build/packaging.rb +64 -4
- data/dev/ci/run_jenkins.sh +1 -7
- data/dev/ci/run_travis.sh +2 -34
- data/doc/Users guide Apache.html +184 -96
- data/doc/Users guide Apache.idmap.txt +9 -3
- data/doc/Users guide Apache.txt +11 -31
- data/doc/Users guide Nginx.html +192 -53
- data/doc/Users guide Nginx.idmap.txt +9 -3
- data/doc/Users guide Nginx.txt +7 -2
- data/doc/Users guide Standalone.html +113 -55
- data/doc/Users guide Standalone.idmap.txt +5 -1
- data/doc/users_guide_snippets/installation.txt +130 -66
- data/doc/users_guide_snippets/tips.txt +38 -0
- data/ext/apache2/Hooks.cpp +28 -2
- data/ext/common/AgentsStarter.h +6 -0
- data/ext/common/ApplicationPool2/AppTypes.h +1 -1
- data/ext/common/ApplicationPool2/Group.h +25 -3
- data/ext/common/ApplicationPool2/Options.h +1 -1
- data/ext/common/ApplicationPool2/Pool/GarbageCollection.h +6 -3
- data/ext/common/Constants.h +3 -1
- data/ext/common/ServerKit/http_parser.cpp +7 -1
- data/ext/common/agents/HelperAgent/Main.cpp +53 -0
- data/ext/common/agents/HelperAgent/RequestHandler.h +4 -0
- data/ext/common/agents/HelperAgent/RequestHandler/ForwardResponse.cpp +6 -0
- data/ext/nginx/ngx_http_passenger_module.c +2 -2
- data/lib/phusion_passenger.rb +15 -2
- data/lib/phusion_passenger/admin_tools/instance_registry.rb +40 -27
- data/lib/phusion_passenger/config/install_agent_command.rb +4 -0
- data/lib/phusion_passenger/config/install_standalone_runtime_command.rb +6 -0
- data/lib/phusion_passenger/config/installation_utils.rb +8 -2
- data/lib/phusion_passenger/config/nginx_engine_compiler.rb +16 -7
- data/lib/phusion_passenger/config/validate_install_command.rb +87 -11
- data/lib/phusion_passenger/constants.rb +2 -0
- data/lib/phusion_passenger/platform_info/apache.rb +114 -33
- data/lib/phusion_passenger/platform_info/apache_detector.rb +28 -4
- data/lib/phusion_passenger/platform_info/compiler.rb +22 -27
- data/lib/phusion_passenger/standalone/start_command.rb +16 -3
- data/lib/phusion_passenger/standalone/start_command/builtin_engine.rb +1 -0
- data/resources/templates/apache2/rpm_installation_recommended.txt.erb +19 -0
- data/resources/templates/standalone/config.erb +3 -2
- metadata +3 -3
- metadata.gz.asc +7 -7
- data/dev/ci/run_rpm_tests.sh +0 -80
@@ -84,6 +84,10 @@ module PhusionPassenger
|
|
84
84
|
options[:download_args] << " "
|
85
85
|
options[:download_args] << "--no-download-progress"
|
86
86
|
end
|
87
|
+
opts.on("--auto", "Run in non-interactive mode. Default when#{nl}" +
|
88
|
+
"stdin or stdout is not a TTY") do
|
89
|
+
options[:compile_args] << "--auto"
|
90
|
+
end
|
87
91
|
opts.on("-f", "--force", "Skip sanity checks") do
|
88
92
|
options[:force] = true
|
89
93
|
options[:download_args] << "--force"
|
@@ -91,6 +91,8 @@ module PhusionPassenger
|
|
91
91
|
opts.on("--nginx-version VERSION", String, "Nginx version to compile. " +
|
92
92
|
"Default: #{PREFERRED_NGINX_VERSION}") do |val|
|
93
93
|
options[:nginx_version] = val
|
94
|
+
options[:compile_args] << "--nginx-version"
|
95
|
+
options[:compile_args] << val
|
94
96
|
end
|
95
97
|
opts.on("--nginx-tarball PATH", String, "Use the given Nginx tarball instead of#{nl}" +
|
96
98
|
"downloading it. You MUST also specify the#{nl}" +
|
@@ -106,6 +108,10 @@ module PhusionPassenger
|
|
106
108
|
options[:download_args] << " "
|
107
109
|
options[:download_args] << "--no-download-progress"
|
108
110
|
end
|
111
|
+
opts.on("--auto", "Run in non-interactive mode. Default when#{nl}" +
|
112
|
+
"stdin or stdout is not a TTY") do
|
113
|
+
options[:install_agent_args] << "--auto"
|
114
|
+
end
|
109
115
|
opts.on("-f", "--force", "Skip sanity checks") do
|
110
116
|
options[:force] = true
|
111
117
|
options[:install_agent_args] << "--force"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
#
|
3
3
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
4
|
-
# Copyright (c) 2014 Phusion
|
4
|
+
# Copyright (c) 2014-2015 Phusion
|
5
5
|
#
|
6
6
|
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
7
7
|
#
|
@@ -233,7 +233,13 @@ module PhusionPassenger
|
|
233
233
|
|
234
234
|
def render_template(name, options = {})
|
235
235
|
options.merge!(:colors => @colors || PhusionPassenger::Utils::AnsiColors.new)
|
236
|
-
|
236
|
+
# This check here is necessary for NginxEngineCompiler. NginxEngineCompiler
|
237
|
+
# derives from AbstractInstaller but also includes InstallationUtils. We want
|
238
|
+
# the AbstractInstaller methods to work when they call render_template.
|
239
|
+
if !File.exist?("#{PhusionPassenger.resources_dir}/templates/#{name}.txt.erb")
|
240
|
+
name = "config/#{name}"
|
241
|
+
end
|
242
|
+
puts ConsoleTextTemplate.new({ :file => name }, options).result
|
237
243
|
end
|
238
244
|
end
|
239
245
|
|
@@ -84,7 +84,9 @@ module PhusionPassenger
|
|
84
84
|
puts "<banner>Installing...</banner>"
|
85
85
|
download_and_extract_nginx_sources
|
86
86
|
determine_support_libraries
|
87
|
-
|
87
|
+
if PhusionPassenger.build_system_dir
|
88
|
+
compile_support_libraries
|
89
|
+
end
|
88
90
|
configure_and_compile_nginx
|
89
91
|
end
|
90
92
|
|
@@ -230,11 +232,18 @@ module PhusionPassenger
|
|
230
232
|
end
|
231
233
|
|
232
234
|
def determine_support_libraries
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
235
|
+
if PhusionPassenger.build_system_dir
|
236
|
+
lib_dir = "#{@working_dir}/common/libpassenger_common"
|
237
|
+
@support_libs = COMMON_LIBRARY.only(*NGINX_LIBS_SELECTOR).
|
238
|
+
set_output_dir(lib_dir).
|
239
|
+
link_objects
|
240
|
+
@support_libs << "#{@working_dir}/common/libboost_oxt.a"
|
241
|
+
else
|
242
|
+
@support_libs = COMMON_LIBRARY.only(*NGINX_LIBS_SELECTOR).
|
243
|
+
set_output_dir("#{PhusionPassenger.lib_dir}/common/libpassenger_common").
|
244
|
+
link_objects
|
245
|
+
@support_libs << "#{PhusionPassenger.lib_dir}/common/libboost_oxt.a"
|
246
|
+
end
|
238
247
|
@support_libs_string = @support_libs.join(" ")
|
239
248
|
end
|
240
249
|
|
@@ -295,7 +304,7 @@ module PhusionPassenger
|
|
295
304
|
command << "#{shell} ./configure --prefix=/tmp " +
|
296
305
|
"#{STANDALONE_NGINX_CONFIGURE_OPTIONS} " +
|
297
306
|
"--add-module=#{Shellwords.escape PhusionPassenger.nginx_module_source_dir}"
|
298
|
-
run_command_yield_activity(command) do
|
307
|
+
run_command_yield_activity(command) do
|
299
308
|
yield
|
300
309
|
end
|
301
310
|
end
|
@@ -42,14 +42,14 @@ module PhusionPassenger
|
|
42
42
|
parse_options
|
43
43
|
prepare
|
44
44
|
begin
|
45
|
-
if !@options[:auto]
|
45
|
+
if !@options[:auto] && !@options[:invoked_from_installer]
|
46
46
|
ask_what_to_validate
|
47
|
-
|
48
|
-
|
47
|
+
end
|
48
|
+
if @options[:validate_apache2]
|
49
|
+
initialize_apache_envvars
|
50
|
+
if !@options[:auto] && !@options[:invoked_from_installer]
|
49
51
|
check_whether_there_are_multiple_apache_installs
|
50
52
|
end
|
51
|
-
elsif @options[:validate_apache2]
|
52
|
-
initialize_apache_envvars
|
53
53
|
end
|
54
54
|
|
55
55
|
if @options[:validate_passenger]
|
@@ -57,7 +57,9 @@ module PhusionPassenger
|
|
57
57
|
check_no_other_installs_in_path
|
58
58
|
end
|
59
59
|
if @options[:validate_apache2]
|
60
|
-
|
60
|
+
if check_apache2_installed
|
61
|
+
check_apache2_load_module_config
|
62
|
+
end
|
61
63
|
end
|
62
64
|
|
63
65
|
if @options[:summary]
|
@@ -147,6 +149,7 @@ module PhusionPassenger
|
|
147
149
|
PhusionPassenger.require_passenger_lib 'platform_info/ruby'
|
148
150
|
PhusionPassenger.require_passenger_lib 'platform_info/apache'
|
149
151
|
PhusionPassenger.require_passenger_lib 'platform_info/apache_detector'
|
152
|
+
PhusionPassenger.require_passenger_lib 'platform_info/depcheck'
|
150
153
|
require 'stringio'
|
151
154
|
require 'pathname'
|
152
155
|
|
@@ -239,9 +242,16 @@ module PhusionPassenger
|
|
239
242
|
# These may not be in PATH if the user did not run this command through sudo.
|
240
243
|
paths << "/usr/bin"
|
241
244
|
paths << "/usr/sbin"
|
242
|
-
paths
|
243
|
-
|
244
|
-
|
245
|
+
# Some of the paths may be symlinks, so we take the realpaths when
|
246
|
+
# possible and remove duplicates. This is especially important on
|
247
|
+
# Red Hat 7, where /bin is a symlink to /usr/bin.
|
248
|
+
paths.map! do |path|
|
249
|
+
try_realpath(path)
|
250
|
+
end
|
251
|
+
|
252
|
+
paths.delete(try_realpath(gem_bindir))
|
253
|
+
paths.delete(try_realpath(homebrew_bindir))
|
254
|
+
paths.delete(try_realpath(PhusionPassenger.bin_dir))
|
245
255
|
paths.uniq!
|
246
256
|
|
247
257
|
other_installs = []
|
@@ -272,6 +282,11 @@ module PhusionPassenger
|
|
272
282
|
end
|
273
283
|
|
274
284
|
def check_whether_there_are_multiple_apache_installs
|
285
|
+
if PlatformInfo.httpd.nil? || PlatformInfo.apxs2.nil?
|
286
|
+
# check_apache2_installed will handle this.
|
287
|
+
return
|
288
|
+
end
|
289
|
+
|
275
290
|
log '<banner>Checking whether there are multiple Apache installations...</banner>'
|
276
291
|
|
277
292
|
output = StringIO.new
|
@@ -358,6 +373,55 @@ module PhusionPassenger
|
|
358
373
|
end
|
359
374
|
end
|
360
375
|
|
376
|
+
def check_apache2_installed
|
377
|
+
checking "whether Apache is installed"
|
378
|
+
|
379
|
+
if PlatformInfo.httpd
|
380
|
+
if PlatformInfo.apxs2
|
381
|
+
check_ok
|
382
|
+
true
|
383
|
+
else
|
384
|
+
check_error
|
385
|
+
|
386
|
+
PlatformInfo::Depcheck.load("depcheck_specs/apache2")
|
387
|
+
dep = PlatformInfo::Depcheck.find("apache2-dev")
|
388
|
+
install_instructions = dep.install_instructions.split("\n").join("\n ")
|
389
|
+
|
390
|
+
if !@options[:invoked_from_installer]
|
391
|
+
next_step = "When done, please re-run this program."
|
392
|
+
end
|
393
|
+
|
394
|
+
suggest %Q{
|
395
|
+
Unable to validate your Apache installation: more software required
|
396
|
+
|
397
|
+
This program requires the <b>apxs2</b> tool in order to be able to validate your
|
398
|
+
Apache installation. This tool is currently not installed. You can solve this
|
399
|
+
as follows:
|
400
|
+
|
401
|
+
#{install_instructions}
|
402
|
+
|
403
|
+
#{next_step}
|
404
|
+
}
|
405
|
+
|
406
|
+
false
|
407
|
+
end
|
408
|
+
else
|
409
|
+
check_error
|
410
|
+
|
411
|
+
PlatformInfo::Depcheck.load("depcheck_specs/apache2")
|
412
|
+
dep = PlatformInfo::Depcheck.find("apache2")
|
413
|
+
install_instructions = dep.install_instructions.split("\n").join("\n ")
|
414
|
+
|
415
|
+
suggest %Q{
|
416
|
+
Apache is not installed. You can solve this as follows:
|
417
|
+
|
418
|
+
#{install_instructions}
|
419
|
+
}
|
420
|
+
|
421
|
+
false
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
361
425
|
def check_apache2_load_module_config
|
362
426
|
checking "whether the Passenger module is correctly configured in Apache"
|
363
427
|
|
@@ -455,8 +519,8 @@ module PhusionPassenger
|
|
455
519
|
module_path = "#{PlatformInfo.httpd_default_root}/#{module_path}"
|
456
520
|
end
|
457
521
|
# Resolve symlinks.
|
458
|
-
module_path =
|
459
|
-
expected_module_path =
|
522
|
+
module_path = try_realpath(module_path)
|
523
|
+
expected_module_path = try_realpath(PhusionPassenger.apache2_module_path)
|
460
524
|
|
461
525
|
if module_path == expected_module_path
|
462
526
|
check_ok
|
@@ -653,6 +717,18 @@ module PhusionPassenger
|
|
653
717
|
def ruby_command
|
654
718
|
PlatformInfo.ruby_command
|
655
719
|
end
|
720
|
+
|
721
|
+
def try_realpath(path)
|
722
|
+
if path
|
723
|
+
begin
|
724
|
+
Pathname.new(path).realpath.to_s
|
725
|
+
rescue Errno::ENOENT, Errno::EACCES
|
726
|
+
path
|
727
|
+
end
|
728
|
+
else
|
729
|
+
nil
|
730
|
+
end
|
731
|
+
end
|
656
732
|
end
|
657
733
|
|
658
734
|
end # module Config
|
@@ -53,6 +53,8 @@ module PhusionPassenger
|
|
53
53
|
DEFAULT_WEB_APP_USER = "nobody"
|
54
54
|
DEFAULT_APP_ENV = "production"
|
55
55
|
DEFAULT_SPAWN_METHOD = "smart"
|
56
|
+
# Apache's unixd.h also defines DEFAULT_USER, so we avoid naming clash here.
|
57
|
+
PASSENGER_DEFAULT_USER = "nobody"
|
56
58
|
DEFAULT_CONCURRENCY_MODEL = "process"
|
57
59
|
DEFAULT_STICKY_SESSIONS_COOKIE_NAME = "_passenger_route"
|
58
60
|
DEFAULT_APP_THREAD_COUNT = 1
|
@@ -112,10 +112,26 @@ module PhusionPassenger
|
|
112
112
|
else
|
113
113
|
apache2ctl = self.apache2ctl
|
114
114
|
end
|
115
|
-
if
|
115
|
+
if os_name == "linux" &&
|
116
|
+
linux_distro_tags.include?(:gentoo) &&
|
117
|
+
apache2ctl == "/usr/sbin/apache2ctl"
|
118
|
+
# On Gentoo, `apache2ctl -V` doesn't forward the command to `apache2 -V`,
|
119
|
+
# but instead prints the OpenRC init system's version.
|
120
|
+
# https://github.com/phusion/passenger/issues/1510
|
121
|
+
if options
|
122
|
+
httpd = options[:httpd] || self.httpd(options)
|
123
|
+
else
|
124
|
+
httpd = self.httpd
|
125
|
+
end
|
126
|
+
version_command = httpd
|
127
|
+
else
|
128
|
+
version_command = apache2ctl
|
129
|
+
end
|
130
|
+
|
131
|
+
if version_command
|
116
132
|
create_temp_file("apache2ctl_V") do |filename, f|
|
117
133
|
e_filename = Shellwords.escape(filename)
|
118
|
-
output = `#{
|
134
|
+
output = `#{version_command} -V 2>#{e_filename}`
|
119
135
|
|
120
136
|
stderr_text = File.open(filename, "rb") do |f2|
|
121
137
|
f2.read
|
@@ -545,22 +561,31 @@ module PhusionPassenger
|
|
545
561
|
flags << "-fPIC"
|
546
562
|
end
|
547
563
|
if with_apr_flags
|
548
|
-
|
549
|
-
|
564
|
+
if language == :c
|
565
|
+
flags << apr_cflags
|
566
|
+
flags << apu_cflags
|
567
|
+
else
|
568
|
+
flags << apr_cxxflags
|
569
|
+
flags << apu_cxxflags
|
570
|
+
end
|
550
571
|
end
|
551
572
|
if !apxs2.nil?
|
552
573
|
apxs2_flags = `#{apxs2} -q CFLAGS`.strip << " -I" << `#{apxs2} -q INCLUDEDIR`.strip
|
553
574
|
apxs2_flags.gsub!(/-O\d? /, '')
|
554
575
|
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
576
|
+
if os_name =~ /solaris/
|
577
|
+
if (language == :c && !cc_is_sun_studio?) || (language == :cxx && !cxx_is_sun_studio?)
|
578
|
+
# Remove flags not supported by GCC
|
579
|
+
# The big problem is Coolstack apxs includes a bunch of solaris -x directives.
|
580
|
+
options = apxs2_flags.split
|
581
|
+
options.reject! { |f| f =~ /^\-x/ }
|
582
|
+
options.reject! { |f| f =~ /^\-Xa/ }
|
583
|
+
options.reject! { |f| f =~ /^\-fast/ }
|
584
|
+
options.reject! { |f| f =~ /^\-mt/ }
|
585
|
+
options.reject! { |f| f =~ /^\-W2/ }
|
586
|
+
apxs2_flags = options.join(' ')
|
587
|
+
apxs2_flags.gsub!(/ ?-Qoption cg ?/, " ")
|
588
|
+
end
|
564
589
|
end
|
565
590
|
|
566
591
|
if os_name == "linux" &&
|
@@ -629,30 +654,50 @@ module PhusionPassenger
|
|
629
654
|
else
|
630
655
|
flags = "-fPIC"
|
631
656
|
end
|
632
|
-
flags << " #{
|
657
|
+
flags << " #{apr_cxx_ldflags} #{apu_cxx_ldflags}"
|
633
658
|
flags.strip!
|
634
659
|
return flags
|
635
660
|
end
|
636
661
|
memoize :apache2_module_cxx_ldflags
|
637
662
|
|
638
663
|
# The C compiler flags that are necessary for programs that use APR.
|
639
|
-
def self.
|
640
|
-
|
664
|
+
def self.apr_cflags
|
665
|
+
determine_apr_c_info[0]
|
666
|
+
end
|
667
|
+
|
668
|
+
# The C++ compiler flags that are necessary for programs that use APR.
|
669
|
+
def self.apr_cxxflags
|
670
|
+
determine_apr_c_info[0]
|
641
671
|
end
|
642
672
|
|
643
673
|
# The linker flags that are necessary for linking programs that use APR.
|
644
|
-
def self.
|
645
|
-
|
674
|
+
def self.apr_c_ldflags
|
675
|
+
determine_apr_c_info[1]
|
676
|
+
end
|
677
|
+
|
678
|
+
# The linker flags that are necessary for linking C++ programs that use APR.
|
679
|
+
def self.apr_cxx_ldflags
|
680
|
+
determine_apr_cxx_info[1]
|
646
681
|
end
|
647
682
|
|
648
683
|
# The C compiler flags that are necessary for programs that use APR-Util.
|
649
|
-
def self.
|
650
|
-
|
684
|
+
def self.apu_cflags
|
685
|
+
determine_apu_c_info[0]
|
686
|
+
end
|
687
|
+
|
688
|
+
# The C++ compiler flags that are necessary for programs that use APR-Util.
|
689
|
+
def self.apu_cxxflags
|
690
|
+
determine_apu_cxx_info[0]
|
651
691
|
end
|
652
692
|
|
653
|
-
# The linker flags that are necessary for linking programs that use APR-Util.
|
654
|
-
def self.
|
655
|
-
|
693
|
+
# The linker flags that are necessary for linking C programs that use APR-Util.
|
694
|
+
def self.apu_c_ldflags
|
695
|
+
determine_apu_c_info[1]
|
696
|
+
end
|
697
|
+
|
698
|
+
# The linker flags that are necessary for linking C++ programs that use APR-Util.
|
699
|
+
def self.apu_cxx_ldflags
|
700
|
+
determine_apu_cxx_info[1]
|
656
701
|
end
|
657
702
|
|
658
703
|
################ Miscellaneous information ################
|
@@ -670,38 +715,74 @@ module PhusionPassenger
|
|
670
715
|
memoize :apr_config_needed_for_building_apache_modules?, true
|
671
716
|
|
672
717
|
private
|
673
|
-
def self.determine_apr_info
|
718
|
+
def self.determine_apr_info(language)
|
674
719
|
if apr_config.nil?
|
675
|
-
|
720
|
+
[nil, nil]
|
676
721
|
else
|
677
722
|
flags = `#{apr_config} --cppflags --includes`.strip
|
678
723
|
libs = `#{apr_config} --link-ld`.strip
|
679
724
|
flags.gsub!(/-O\d? /, '')
|
680
725
|
if os_name =~ /solaris/
|
681
|
-
|
682
|
-
|
726
|
+
if (language == :c && !cc_is_sun_studio?) || (language == :cxx && !cxx_is_sun_studio?)
|
727
|
+
# Remove flags not supported by non-Sun Studio compilers
|
728
|
+
flags = flags.split(/ +/).reject do |f|
|
729
|
+
f =~ /^\-mt/
|
730
|
+
end
|
731
|
+
flags = flags.join(' ')
|
732
|
+
end
|
683
733
|
elsif os_name =~ /aix/
|
684
734
|
libs << " -Wl,-G -Wl,-brtl"
|
685
735
|
end
|
686
|
-
|
736
|
+
[flags, libs]
|
687
737
|
end
|
688
738
|
end
|
689
|
-
memoize :determine_apr_info, true
|
690
739
|
private_class_method :determine_apr_info
|
691
740
|
|
692
|
-
def self.
|
741
|
+
def self.determine_apr_c_info
|
742
|
+
determine_apr_info(:c)
|
743
|
+
end
|
744
|
+
private_class_method :determine_apr_c_info
|
745
|
+
memoize :determine_apr_c_info, true
|
746
|
+
|
747
|
+
def self.determine_apr_cxx_info
|
748
|
+
determine_apr_info(:cxx)
|
749
|
+
end
|
750
|
+
private_class_method :determine_apr_cxx_info
|
751
|
+
memoize :determine_apr_cxx_info, true
|
752
|
+
|
753
|
+
def self.determine_apu_info(language)
|
693
754
|
if apu_config.nil?
|
694
|
-
|
755
|
+
[nil, nil]
|
695
756
|
else
|
696
757
|
flags = `#{apu_config} --includes`.strip
|
697
758
|
libs = `#{apu_config} --link-ld`.strip
|
698
759
|
flags.gsub!(/-O\d? /, '')
|
699
|
-
|
760
|
+
if os_name =~ /solaris/
|
761
|
+
if (language == :c && !cc_is_sun_studio?) || (language == :cxx && !cxx_is_sun_studio?)
|
762
|
+
# Remove flags not supported by non-Sun Studio compilers
|
763
|
+
flags = flags.split(/ +/).reject do |f|
|
764
|
+
f =~ /^\-mt/
|
765
|
+
end
|
766
|
+
flags = flags.join(' ')
|
767
|
+
end
|
768
|
+
end
|
769
|
+
[flags, libs]
|
700
770
|
end
|
701
771
|
end
|
702
|
-
memoize :determine_apu_info, true
|
703
772
|
private_class_method :determine_apu_info
|
704
773
|
|
774
|
+
def self.determine_apu_c_info
|
775
|
+
determine_apu_info(:c)
|
776
|
+
end
|
777
|
+
private_class_method :determine_apu_c_info
|
778
|
+
memoize :determine_apu_c_info, true
|
779
|
+
|
780
|
+
def self.determine_apu_cxx_info
|
781
|
+
determine_apu_info(:cxx)
|
782
|
+
end
|
783
|
+
private_class_method :determine_apu_cxx_info
|
784
|
+
memoize :determine_apu_cxx_info, true
|
785
|
+
|
705
786
|
def self.scan_for_included_apache2_config_files(config_file, state, options = nil)
|
706
787
|
begin
|
707
788
|
config = File.open(config_file, "rb") do |f|
|