passenger 5.0.8 → 5.0.9

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.

Files changed (168) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/.editorconfig +20 -0
  5. data/CHANGELOG +21 -0
  6. data/bin/passenger-install-apache2-module +3 -1
  7. data/build/agents.rb +7 -5
  8. data/build/basics.rb +3 -3
  9. data/build/common_library.rb +52 -30
  10. data/build/cxx_tests.rb +20 -13
  11. data/build/misc.rb +5 -5
  12. data/doc/Design and Architecture.html +1 -1
  13. data/doc/Design and Architecture.txt +1 -1
  14. data/doc/Packaging.html +4 -4
  15. data/doc/Packaging.txt.md +4 -4
  16. data/doc/Users guide Apache.html +22 -9
  17. data/doc/Users guide Apache.idmap.txt +4 -2
  18. data/doc/Users guide Apache.txt +2 -0
  19. data/doc/Users guide Nginx.html +22 -9
  20. data/doc/Users guide Nginx.idmap.txt +4 -2
  21. data/doc/Users guide Nginx.txt +2 -0
  22. data/doc/Users guide Standalone.html +14 -9
  23. data/doc/Users guide Standalone.idmap.txt +4 -2
  24. data/doc/users_guide_snippets/installation.txt +10 -6
  25. data/ext/apache2/Hooks.cpp +13 -2
  26. data/ext/common/ApplicationPool2/Pool/Inspection.h +8 -3
  27. data/ext/common/BackgroundEventLoop.cpp +249 -67
  28. data/ext/common/BackgroundEventLoop.h +5 -5
  29. data/ext/common/Constants.h +1 -1
  30. data/ext/common/InstanceDirectory.h +8 -6
  31. data/ext/common/ServerKit/Context.h +8 -2
  32. data/ext/common/ServerKit/FileBufferedChannel.h +262 -226
  33. data/ext/common/ServerKit/HeaderTable.h +28 -3
  34. data/ext/common/ServerKit/HttpHeaderParser.h +37 -13
  35. data/ext/common/ServerKit/HttpServer.h +17 -1
  36. data/ext/common/ServerKit/Implementation.cpp +2 -0
  37. data/ext/common/ServerKit/Server.h +25 -28
  38. data/ext/common/Utils/IOUtils.cpp +11 -0
  39. data/ext/common/Utils/ProcessMetricsCollector.h +4 -0
  40. data/ext/common/Utils/StrIntUtils.cpp +11 -7
  41. data/ext/common/Utils/StrIntUtils.h +1 -1
  42. data/ext/common/Utils/StrIntUtilsNoStrictAliasing.cpp +21 -16
  43. data/ext/common/agents/Base.cpp +6 -0
  44. data/ext/common/agents/Base.h +2 -0
  45. data/ext/common/agents/HelperAgent/AdminServer.h +25 -25
  46. data/ext/common/agents/HelperAgent/Main.cpp +37 -12
  47. data/ext/common/agents/HelperAgent/RequestHandler.h +18 -20
  48. data/ext/common/agents/HelperAgent/RequestHandler/AppResponse.h +4 -0
  49. data/ext/common/agents/HelperAgent/RequestHandler/ForwardResponse.cpp +10 -6
  50. data/ext/common/agents/HelperAgent/RequestHandler/Hooks.cpp +2 -0
  51. data/ext/common/agents/HelperAgent/RequestHandler/InitRequest.cpp +1 -1
  52. data/ext/common/agents/HelperAgent/RequestHandler/SendRequest.cpp +1 -1
  53. data/ext/common/agents/HelperAgent/RequestHandler/Utils.cpp +9 -2
  54. data/ext/common/agents/HelperAgent/ResponseCache.h +11 -11
  55. data/ext/common/agents/LoggingAgent/AdminServer.h +8 -8
  56. data/ext/common/agents/LoggingAgent/Main.cpp +6 -5
  57. data/ext/common/agents/Watchdog/AdminServer.h +13 -13
  58. data/ext/common/agents/Watchdog/Main.cpp +8 -3
  59. data/ext/libuv/.gitignore +72 -0
  60. data/ext/libuv/AUTHORS +199 -0
  61. data/ext/libuv/ChangeLog +2023 -0
  62. data/ext/libuv/LICENSE +46 -0
  63. data/ext/libuv/Makefile.am +336 -0
  64. data/ext/libuv/README.md +197 -0
  65. data/ext/libuv/checksparse.sh +233 -0
  66. data/ext/libuv/common.gypi +210 -0
  67. data/ext/libuv/configure.ac +67 -0
  68. data/ext/libuv/gyp_uv.py +96 -0
  69. data/ext/libuv/include/android-ifaddrs.h +54 -0
  70. data/ext/libuv/include/pthread-fixes.h +72 -0
  71. data/ext/libuv/include/tree.h +768 -0
  72. data/ext/libuv/include/uv-aix.h +32 -0
  73. data/ext/libuv/include/uv-bsd.h +34 -0
  74. data/ext/libuv/include/uv-darwin.h +61 -0
  75. data/ext/libuv/include/uv-errno.h +418 -0
  76. data/ext/libuv/include/uv-linux.h +34 -0
  77. data/ext/libuv/include/uv-sunos.h +44 -0
  78. data/ext/libuv/include/uv-threadpool.h +37 -0
  79. data/ext/libuv/include/uv-unix.h +383 -0
  80. data/ext/libuv/include/uv-version.h +39 -0
  81. data/ext/libuv/include/uv.h +1455 -0
  82. data/ext/libuv/libuv.pc.in +11 -0
  83. data/ext/libuv/m4/.gitignore +4 -0
  84. data/ext/libuv/m4/as_case.m4 +21 -0
  85. data/ext/libuv/m4/libuv-check-flags.m4 +319 -0
  86. data/ext/libuv/src/fs-poll.c +255 -0
  87. data/ext/libuv/src/heap-inl.h +245 -0
  88. data/ext/libuv/src/inet.c +313 -0
  89. data/ext/libuv/src/queue.h +92 -0
  90. data/ext/libuv/src/threadpool.c +303 -0
  91. data/ext/libuv/src/unix/aix.c +1240 -0
  92. data/ext/libuv/src/unix/android-ifaddrs.c +703 -0
  93. data/ext/libuv/src/unix/async.c +284 -0
  94. data/ext/libuv/src/unix/atomic-ops.h +60 -0
  95. data/ext/libuv/src/unix/core.c +985 -0
  96. data/ext/libuv/src/unix/darwin-proctitle.c +206 -0
  97. data/ext/libuv/src/unix/darwin.c +331 -0
  98. data/ext/libuv/src/unix/dl.c +83 -0
  99. data/ext/libuv/src/unix/freebsd.c +435 -0
  100. data/ext/libuv/src/unix/fs.c +1189 -0
  101. data/ext/libuv/src/unix/fsevents.c +899 -0
  102. data/ext/libuv/src/unix/getaddrinfo.c +202 -0
  103. data/ext/libuv/src/unix/getnameinfo.c +120 -0
  104. data/ext/libuv/src/unix/internal.h +314 -0
  105. data/ext/libuv/src/unix/kqueue.c +418 -0
  106. data/ext/libuv/src/unix/linux-core.c +876 -0
  107. data/ext/libuv/src/unix/linux-inotify.c +257 -0
  108. data/ext/libuv/src/unix/linux-syscalls.c +471 -0
  109. data/ext/libuv/src/unix/linux-syscalls.h +158 -0
  110. data/ext/libuv/src/unix/loop-watcher.c +63 -0
  111. data/ext/libuv/src/unix/loop.c +135 -0
  112. data/ext/libuv/src/unix/netbsd.c +368 -0
  113. data/ext/libuv/src/unix/openbsd.c +384 -0
  114. data/ext/libuv/src/unix/pipe.c +288 -0
  115. data/ext/libuv/src/unix/poll.c +113 -0
  116. data/ext/libuv/src/unix/process.c +551 -0
  117. data/ext/libuv/src/unix/proctitle.c +102 -0
  118. data/ext/libuv/src/unix/pthread-fixes.c +103 -0
  119. data/ext/libuv/src/unix/signal.c +465 -0
  120. data/ext/libuv/src/unix/spinlock.h +53 -0
  121. data/ext/libuv/src/unix/stream.c +1598 -0
  122. data/ext/libuv/src/unix/sunos.c +763 -0
  123. data/ext/libuv/src/unix/tcp.c +327 -0
  124. data/ext/libuv/src/unix/thread.c +519 -0
  125. data/ext/libuv/src/unix/timer.c +172 -0
  126. data/ext/libuv/src/unix/tty.c +265 -0
  127. data/ext/libuv/src/unix/udp.c +833 -0
  128. data/ext/libuv/src/uv-common.c +544 -0
  129. data/ext/libuv/src/uv-common.h +214 -0
  130. data/ext/libuv/src/version.c +49 -0
  131. data/ext/libuv/uv.gyp +487 -0
  132. data/ext/nginx/ContentHandler.c +21 -10
  133. data/ext/nginx/ngx_http_passenger_module.c +7 -0
  134. data/ext/oxt/implementation.cpp +9 -2
  135. data/ext/oxt/initialize.hpp +5 -1
  136. data/lib/phusion_passenger.rb +3 -3
  137. data/lib/phusion_passenger/admin_tools/instance.rb +10 -6
  138. data/lib/phusion_passenger/admin_tools/instance_registry.rb +6 -2
  139. data/lib/phusion_passenger/packaging.rb +3 -4
  140. data/lib/phusion_passenger/platform_info.rb +13 -1
  141. data/lib/phusion_passenger/platform_info/apache.rb +15 -4
  142. data/lib/phusion_passenger/platform_info/apache_detector.rb +5 -1
  143. data/lib/phusion_passenger/rack/thread_handler_extension.rb +184 -99
  144. data/lib/phusion_passenger/request_handler/thread_handler.rb +13 -6
  145. data/lib/phusion_passenger/standalone/start_command.rb +2 -2
  146. data/resources/templates/apache2/apache_install_broken.txt.erb +2 -1
  147. metadata +99 -22
  148. metadata.gz.asc +7 -7
  149. data/ext/libeio/Changes +0 -76
  150. data/ext/libeio/LICENSE +0 -36
  151. data/ext/libeio/Makefile.am +0 -15
  152. data/ext/libeio/Makefile.in +0 -694
  153. data/ext/libeio/aclocal.m4 +0 -9418
  154. data/ext/libeio/autogen.sh +0 -3
  155. data/ext/libeio/config.guess +0 -1540
  156. data/ext/libeio/config.h.in +0 -136
  157. data/ext/libeio/config.sub +0 -1779
  158. data/ext/libeio/configure +0 -14822
  159. data/ext/libeio/configure.ac +0 -22
  160. data/ext/libeio/demo.c +0 -194
  161. data/ext/libeio/ecb.h +0 -714
  162. data/ext/libeio/eio.c +0 -2818
  163. data/ext/libeio/eio.h +0 -414
  164. data/ext/libeio/install-sh +0 -520
  165. data/ext/libeio/libeio.m4 +0 -195
  166. data/ext/libeio/ltmain.sh +0 -9636
  167. data/ext/libeio/missing +0 -376
  168. data/ext/libeio/xthread.h +0 -166
@@ -0,0 +1,233 @@
1
+ #!/bin/sh
2
+
3
+ # Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
4
+ #
5
+ # Permission to use, copy, modify, and/or distribute this software for any
6
+ # purpose with or without fee is hereby granted, provided that the above
7
+ # copyright notice and this permission notice appear in all copies.
8
+ #
9
+ # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
+
17
+ SPARSE=${SPARSE:-sparse}
18
+
19
+ SPARSE_FLAGS=${SPARSE_FLAGS:-"
20
+ -D__POSIX__
21
+ -Wsparse-all
22
+ -Wno-do-while
23
+ -Wno-transparent-union
24
+ -Iinclude
25
+ -Isrc
26
+ "}
27
+
28
+ SOURCES="
29
+ include/tree.h
30
+ include/uv-unix.h
31
+ include/uv.h
32
+ src/fs-poll.c
33
+ src/inet.c
34
+ src/queue.h
35
+ src/unix/async.c
36
+ src/unix/core.c
37
+ src/unix/dl.c
38
+ src/unix/fs.c
39
+ src/unix/getaddrinfo.c
40
+ src/unix/internal.h
41
+ src/unix/loop-watcher.c
42
+ src/unix/loop.c
43
+ src/unix/pipe.c
44
+ src/unix/poll.c
45
+ src/unix/process.c
46
+ src/unix/signal.c
47
+ src/unix/stream.c
48
+ src/unix/tcp.c
49
+ src/unix/thread.c
50
+ src/unix/threadpool.c
51
+ src/unix/timer.c
52
+ src/unix/tty.c
53
+ src/unix/udp.c
54
+ src/uv-common.c
55
+ src/uv-common.h
56
+ "
57
+
58
+ TESTS="
59
+ test/benchmark-async-pummel.c
60
+ test/benchmark-async.c
61
+ test/benchmark-fs-stat.c
62
+ test/benchmark-getaddrinfo.c
63
+ test/benchmark-loop-count.c
64
+ test/benchmark-million-async.c
65
+ test/benchmark-million-timers.c
66
+ test/benchmark-multi-accept.c
67
+ test/benchmark-ping-pongs.c
68
+ test/benchmark-pound.c
69
+ test/benchmark-pump.c
70
+ test/benchmark-sizes.c
71
+ test/benchmark-spawn.c
72
+ test/benchmark-tcp-write-batch.c
73
+ test/benchmark-thread.c
74
+ test/benchmark-udp-pummel.c
75
+ test/blackhole-server.c
76
+ test/dns-server.c
77
+ test/echo-server.c
78
+ test/run-benchmarks.c
79
+ test/run-tests.c
80
+ test/runner-unix.c
81
+ test/runner-unix.h
82
+ test/runner.c
83
+ test/runner.h
84
+ test/task.h
85
+ test/test-active.c
86
+ test/test-async.c
87
+ test/test-barrier.c
88
+ test/test-callback-order.c
89
+ test/test-callback-stack.c
90
+ test/test-condvar.c
91
+ test/test-connection-fail.c
92
+ test/test-cwd-and-chdir.c
93
+ test/test-delayed-accept.c
94
+ test/test-dlerror.c
95
+ test/test-embed.c
96
+ test/test-error.c
97
+ test/test-fail-always.c
98
+ test/test-fs-event.c
99
+ test/test-fs-poll.c
100
+ test/test-fs.c
101
+ test/test-get-currentexe.c
102
+ test/test-get-loadavg.c
103
+ test/test-get-memory.c
104
+ test/test-getaddrinfo.c
105
+ test/test-getsockname.c
106
+ test/test-hrtime.c
107
+ test/test-idle.c
108
+ test/test-ip6-addr.c
109
+ test/test-ipc-send-recv.c
110
+ test/test-ipc.c
111
+ test/test-loop-handles.c
112
+ test/test-multiple-listen.c
113
+ test/test-mutexes.c
114
+ test/test-pass-always.c
115
+ test/test-ping-pong.c
116
+ test/test-pipe-bind-error.c
117
+ test/test-pipe-connect-error.c
118
+ test/test-pipe-sendmsg.c
119
+ test/test-pipe-server-close.c
120
+ test/test-platform-output.c
121
+ test/test-poll-close.c
122
+ test/test-poll.c
123
+ test/test-process-title.c
124
+ test/test-ref.c
125
+ test/test-run-nowait.c
126
+ test/test-run-once.c
127
+ test/test-semaphore.c
128
+ test/test-shutdown-close.c
129
+ test/test-shutdown-eof.c
130
+ test/test-signal-multiple-loops.c
131
+ test/test-signal.c
132
+ test/test-spawn.c
133
+ test/test-stdio-over-pipes.c
134
+ test/test-tcp-bind-error.c
135
+ test/test-tcp-bind6-error.c
136
+ test/test-tcp-close-while-connecting.c
137
+ test/test-tcp-close-accept.c
138
+ test/test-tcp-close.c
139
+ test/test-tcp-connect-error-after-write.c
140
+ test/test-tcp-connect-error.c
141
+ test/test-tcp-connect-timeout.c
142
+ test/test-tcp-connect6-error.c
143
+ test/test-tcp-flags.c
144
+ test/test-tcp-open.c
145
+ test/test-tcp-read-stop.c
146
+ test/test-tcp-shutdown-after-write.c
147
+ test/test-tcp-unexpected-read.c
148
+ test/test-tcp-oob.c
149
+ test/test-tcp-write-error.c
150
+ test/test-tcp-write-to-half-open-connection.c
151
+ test/test-tcp-writealot.c
152
+ test/test-thread.c
153
+ test/test-threadpool-cancel.c
154
+ test/test-threadpool.c
155
+ test/test-timer-again.c
156
+ test/test-timer.c
157
+ test/test-tty.c
158
+ test/test-udp-dgram-too-big.c
159
+ test/test-udp-ipv6.c
160
+ test/test-udp-multicast-join.c
161
+ test/test-udp-multicast-ttl.c
162
+ test/test-udp-open.c
163
+ test/test-udp-options.c
164
+ test/test-udp-send-and-recv.c
165
+ test/test-walk-handles.c
166
+ test/test-watcher-cross-stop.c
167
+ "
168
+
169
+ case `uname -s` in
170
+ AIX)
171
+ SPARSE_FLAGS="$SPARSE_FLAGS -D_AIX=1"
172
+ SOURCES="$SOURCES
173
+ src/unix/aix.c"
174
+ ;;
175
+ Darwin)
176
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__APPLE__=1"
177
+ SOURCES="$SOURCES
178
+ include/uv-bsd.h
179
+ src/unix/darwin.c
180
+ src/unix/kqueue.c
181
+ src/unix/fsevents.c"
182
+ ;;
183
+ DragonFly)
184
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__DragonFly__=1"
185
+ SOURCES="$SOURCES
186
+ include/uv-bsd.h
187
+ src/unix/kqueue.c
188
+ src/unix/freebsd.c"
189
+ ;;
190
+ FreeBSD)
191
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__FreeBSD__=1"
192
+ SOURCES="$SOURCES
193
+ include/uv-bsd.h
194
+ src/unix/kqueue.c
195
+ src/unix/freebsd.c"
196
+ ;;
197
+ Linux)
198
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1"
199
+ SOURCES="$SOURCES
200
+ include/uv-linux.h
201
+ src/unix/linux-inotify.c
202
+ src/unix/linux-core.c
203
+ src/unix/linux-syscalls.c
204
+ src/unix/linux-syscalls.h"
205
+ ;;
206
+ NetBSD)
207
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1"
208
+ SOURCES="$SOURCES
209
+ include/uv-bsd.h
210
+ src/unix/kqueue.c
211
+ src/unix/netbsd.c"
212
+ ;;
213
+ OpenBSD)
214
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__OpenBSD__=1"
215
+ SOURCES="$SOURCES
216
+ include/uv-bsd.h
217
+ src/unix/kqueue.c
218
+ src/unix/openbsd.c"
219
+ ;;
220
+ SunOS)
221
+ SPARSE_FLAGS="$SPARSE_FLAGS -D__sun=1"
222
+ SOURCES="$SOURCES
223
+ include/uv-sunos.h
224
+ src/unix/sunos.c"
225
+ ;;
226
+ esac
227
+
228
+ for ARCH in __i386__ __x86_64__ __arm__ __mips__; do
229
+ $SPARSE $SPARSE_FLAGS -D$ARCH=1 $SOURCES
230
+ done
231
+
232
+ # Tests are architecture independent.
233
+ $SPARSE $SPARSE_FLAGS -Itest $TESTS
@@ -0,0 +1,210 @@
1
+ {
2
+ 'variables': {
3
+ 'visibility%': 'hidden', # V8's visibility setting
4
+ 'target_arch%': 'ia32', # set v8's target architecture
5
+ 'host_arch%': 'ia32', # set v8's host architecture
6
+ 'uv_library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
7
+ 'component%': 'static_library', # NB. these names match with what V8 expects
8
+ 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
9
+ },
10
+
11
+ 'target_defaults': {
12
+ 'default_configuration': 'Debug',
13
+ 'configurations': {
14
+ 'Debug': {
15
+ 'defines': [ 'DEBUG', '_DEBUG' ],
16
+ 'cflags': [ '-g', '-O0', '-fwrapv' ],
17
+ 'msvs_settings': {
18
+ 'VCCLCompilerTool': {
19
+ 'target_conditions': [
20
+ ['uv_library=="static_library"', {
21
+ 'RuntimeLibrary': 1, # static debug
22
+ }, {
23
+ 'RuntimeLibrary': 3, # DLL debug
24
+ }],
25
+ ],
26
+ 'Optimization': 0, # /Od, no optimization
27
+ 'MinimalRebuild': 'false',
28
+ 'OmitFramePointers': 'false',
29
+ 'BasicRuntimeChecks': 3, # /RTC1
30
+ },
31
+ 'VCLinkerTool': {
32
+ 'LinkIncremental': 2, # enable incremental linking
33
+ },
34
+ },
35
+ 'xcode_settings': {
36
+ 'GCC_OPTIMIZATION_LEVEL': '0',
37
+ 'OTHER_CFLAGS': [ '-Wno-strict-aliasing' ],
38
+ },
39
+ 'conditions': [
40
+ ['OS != "win"', {
41
+ 'defines': [ 'EV_VERIFY=2' ],
42
+ }],
43
+ ]
44
+ },
45
+ 'Release': {
46
+ 'defines': [ 'NDEBUG' ],
47
+ 'cflags': [
48
+ '-O3',
49
+ '-fstrict-aliasing',
50
+ '-fomit-frame-pointer',
51
+ '-fdata-sections',
52
+ '-ffunction-sections',
53
+ ],
54
+ 'msvs_settings': {
55
+ 'VCCLCompilerTool': {
56
+ 'target_conditions': [
57
+ ['uv_library=="static_library"', {
58
+ 'RuntimeLibrary': 0, # static release
59
+ }, {
60
+ 'RuntimeLibrary': 2, # debug release
61
+ }],
62
+ ],
63
+ 'Optimization': 3, # /Ox, full optimization
64
+ 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
65
+ 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
66
+ 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
67
+ 'OmitFramePointers': 'true',
68
+ 'EnableFunctionLevelLinking': 'true',
69
+ 'EnableIntrinsicFunctions': 'true',
70
+ },
71
+ 'VCLibrarianTool': {
72
+ 'AdditionalOptions': [
73
+ '/LTCG', # link time code generation
74
+ ],
75
+ },
76
+ 'VCLinkerTool': {
77
+ 'LinkTimeCodeGeneration': 1, # link-time code generation
78
+ 'OptimizeReferences': 2, # /OPT:REF
79
+ 'EnableCOMDATFolding': 2, # /OPT:ICF
80
+ 'LinkIncremental': 1, # disable incremental linking
81
+ },
82
+ },
83
+ }
84
+ },
85
+ 'msvs_settings': {
86
+ 'VCCLCompilerTool': {
87
+ 'StringPooling': 'true', # pool string literals
88
+ 'DebugInformationFormat': 3, # Generate a PDB
89
+ 'WarningLevel': 3,
90
+ 'BufferSecurityCheck': 'true',
91
+ 'ExceptionHandling': 1, # /EHsc
92
+ 'SuppressStartupBanner': 'true',
93
+ 'WarnAsError': 'false',
94
+ 'AdditionalOptions': [
95
+ '/MP', # compile across multiple CPUs
96
+ ],
97
+ },
98
+ 'VCLibrarianTool': {
99
+ },
100
+ 'VCLinkerTool': {
101
+ 'GenerateDebugInformation': 'true',
102
+ 'RandomizedBaseAddress': 2, # enable ASLR
103
+ 'DataExecutionPrevention': 2, # enable DEP
104
+ 'AllowIsolation': 'true',
105
+ 'SuppressStartupBanner': 'true',
106
+ 'target_conditions': [
107
+ ['_type=="executable"', {
108
+ 'SubSystem': 1, # console executable
109
+ }],
110
+ ],
111
+ },
112
+ },
113
+ 'conditions': [
114
+ ['OS == "win"', {
115
+ 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
116
+ 'defines': [
117
+ 'WIN32',
118
+ # we don't really want VC++ warning us about
119
+ # how dangerous C functions are...
120
+ '_CRT_SECURE_NO_DEPRECATE',
121
+ # ... or that C implementations shouldn't use
122
+ # POSIX names
123
+ '_CRT_NONSTDC_NO_DEPRECATE',
124
+ ],
125
+ 'target_conditions': [
126
+ ['target_arch=="x64"', {
127
+ 'msvs_configuration_platform': 'x64'
128
+ }]
129
+ ]
130
+ }],
131
+ ['OS in "freebsd linux openbsd solaris android"', {
132
+ 'cflags': [ '-Wall' ],
133
+ 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
134
+ 'target_conditions': [
135
+ ['_type=="static_library"', {
136
+ 'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19
137
+ }],
138
+ ],
139
+ 'conditions': [
140
+ [ 'host_arch != target_arch and target_arch=="ia32"', {
141
+ 'cflags': [ '-m32' ],
142
+ 'ldflags': [ '-m32' ],
143
+ }],
144
+ [ 'target_arch=="x32"', {
145
+ 'cflags': [ '-mx32' ],
146
+ 'ldflags': [ '-mx32' ],
147
+ }],
148
+ [ 'OS=="linux"', {
149
+ 'cflags': [ '-ansi' ],
150
+ }],
151
+ [ 'OS=="solaris"', {
152
+ 'cflags': [ '-pthreads' ],
153
+ 'ldflags': [ '-pthreads' ],
154
+ }],
155
+ [ 'OS not in "solaris android"', {
156
+ 'cflags': [ '-pthread' ],
157
+ 'ldflags': [ '-pthread' ],
158
+ }],
159
+ [ 'visibility=="hidden"', {
160
+ 'cflags': [ '-fvisibility=hidden' ],
161
+ }],
162
+ ],
163
+ }],
164
+ ['OS=="mac"', {
165
+ 'xcode_settings': {
166
+ 'ALWAYS_SEARCH_USER_PATHS': 'NO',
167
+ 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
168
+ 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
169
+ # (Equivalent to -fPIC)
170
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
171
+ 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
172
+ 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
173
+ # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
174
+ 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
175
+ 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
176
+ 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
177
+ 'PREBINDING': 'NO', # No -Wl,-prebind
178
+ 'USE_HEADERMAP': 'NO',
179
+ 'OTHER_CFLAGS': [
180
+ '-fstrict-aliasing',
181
+ ],
182
+ 'WARNING_CFLAGS': [
183
+ '-Wall',
184
+ '-Wendif-labels',
185
+ '-W',
186
+ '-Wno-unused-parameter',
187
+ ],
188
+ },
189
+ 'conditions': [
190
+ ['target_arch=="ia32"', {
191
+ 'xcode_settings': {'ARCHS': ['i386']},
192
+ }],
193
+ ['target_arch=="x64"', {
194
+ 'xcode_settings': {'ARCHS': ['x86_64']},
195
+ }],
196
+ ],
197
+ 'target_conditions': [
198
+ ['_type!="static_library"', {
199
+ 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
200
+ }],
201
+ ],
202
+ }],
203
+ ['OS=="solaris"', {
204
+ 'cflags': [ '-fno-omit-frame-pointer' ],
205
+ # pull in V8's postmortem metadata
206
+ 'ldflags': [ '-Wl,-z,allextract' ]
207
+ }],
208
+ ],
209
+ },
210
+ }
@@ -0,0 +1,67 @@
1
+ # Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
2
+ #
3
+ # Permission to use, copy, modify, and/or distribute this software for any
4
+ # purpose with or without fee is hereby granted, provided that the above
5
+ # copyright notice and this permission notice appear in all copies.
6
+ #
7
+ # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
+ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14
+
15
+ AC_PREREQ(2.57)
16
+ AC_INIT([libuv], [1.5.0], [https://github.com/libuv/libuv/issues])
17
+ AC_CONFIG_MACRO_DIR([m4])
18
+ m4_include([m4/libuv-extra-automake-flags.m4])
19
+ m4_include([m4/as_case.m4])
20
+ m4_include([m4/libuv-check-flags.m4])
21
+ AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects] UV_EXTRA_AUTOMAKE_FLAGS)
22
+ AC_CANONICAL_HOST
23
+ AC_ENABLE_SHARED
24
+ AC_ENABLE_STATIC
25
+ AC_PROG_CC
26
+ AM_PROG_CC_C_O
27
+ CC_CHECK_CFLAGS_APPEND([-fvisibility=hidden])
28
+ CC_CHECK_CFLAGS_APPEND([-g])
29
+ CC_CHECK_CFLAGS_APPEND([-std=gnu89])
30
+ CC_CHECK_CFLAGS_APPEND([-pedantic])
31
+ CC_CHECK_CFLAGS_APPEND([-Wall])
32
+ CC_CHECK_CFLAGS_APPEND([-Wextra])
33
+ CC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter])
34
+ # AM_PROG_AR is not available in automake v0.11 but it's essential in v0.12.
35
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
36
+ # autoconf complains if AC_PROG_LIBTOOL precedes AM_PROG_AR.
37
+ AC_PROG_LIBTOOL
38
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
39
+ LT_INIT
40
+ # TODO(bnoordhuis) Check for -pthread vs. -pthreads
41
+ AC_CHECK_LIB([dl], [dlopen])
42
+ AC_CHECK_LIB([kstat], [kstat_lookup])
43
+ AC_CHECK_LIB([kvm], [kvm_open])
44
+ AC_CHECK_LIB([nsl], [gethostbyname])
45
+ AC_CHECK_LIB([perfstat], [perfstat_cpu])
46
+ AC_CHECK_LIB([pthread], [pthread_mutex_init])
47
+ AC_CHECK_LIB([rt], [clock_gettime])
48
+ AC_CHECK_LIB([sendfile], [sendfile])
49
+ AC_CHECK_LIB([socket], [socket])
50
+ AC_SYS_LARGEFILE
51
+ AM_CONDITIONAL([AIX], [AS_CASE([$host_os],[aix*], [true], [false])])
52
+ AM_CONDITIONAL([ANDROID], [AS_CASE([$host_os],[linux-android*],[true], [false])])
53
+ AM_CONDITIONAL([DARWIN], [AS_CASE([$host_os],[darwin*], [true], [false])])
54
+ AM_CONDITIONAL([DRAGONFLY],[AS_CASE([$host_os],[dragonfly*], [true], [false])])
55
+ AM_CONDITIONAL([FREEBSD], [AS_CASE([$host_os],[freebsd*], [true], [false])])
56
+ AM_CONDITIONAL([LINUX], [AS_CASE([$host_os],[linux*], [true], [false])])
57
+ AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false])])
58
+ AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])])
59
+ AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])])
60
+ AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])])
61
+ AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
62
+ AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"])
63
+ AS_IF([test "x$PKG_CONFIG" != "x"], [
64
+ AC_CONFIG_FILES([libuv.pc])
65
+ ])
66
+ AC_CONFIG_FILES([Makefile])
67
+ AC_OUTPUT