0003-auto-set-ngx_feature_run_force_result-for-each-featu.patch 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. From 57d9d632be9a9f7e3ac00f9eb10b069afd0b1543 Mon Sep 17 00:00:00 2001
  2. From: Samuel Martin <s.martin49@gmail.com>
  3. Date: Thu, 29 May 2014 18:52:10 +0200
  4. Subject: [PATCH] auto/*: set ngx_feature_run_force_result for each feature
  5. requiring run test
  6. Each feature requiring a run test has a matching preset variable (called
  7. ngx_force_*) used to set ngx_feature_run_force_result.
  8. These ngx_force_* variables are passed through the environment at configure
  9. time.
  10. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  11. Refresh for 1.8.0.
  12. Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
  13. [rebased against v1.20.1]
  14. Signed-off-by: Adam Duskett <Aduskett@gmail.com>
  15. ---
  16. auto/cc/conf | 3 +++
  17. auto/cc/name | 1 +
  18. auto/lib/libatomic/conf | 1 +
  19. auto/os/darwin | 3 +++
  20. auto/os/linux | 4 ++++
  21. auto/unix | 7 +++++++
  22. 6 files changed, 19 insertions(+)
  23. diff --git a/auto/cc/conf b/auto/cc/conf
  24. index afbca62b..ad42c800 100644
  25. --- a/auto/cc/conf
  26. +++ b/auto/cc/conf
  27. @@ -184,6 +184,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
  28. ngx_feature="gcc builtin atomic operations"
  29. ngx_feature_name=NGX_HAVE_GCC_ATOMIC
  30. ngx_feature_run=yes
  31. + ngx_feature_run_force_result="$ngx_force_gcc_have_atomic"
  32. ngx_feature_incs=
  33. ngx_feature_path=
  34. ngx_feature_libs=
  35. @@ -205,6 +206,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
  36. ngx_feature="C99 variadic macros"
  37. ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS"
  38. ngx_feature_run=yes
  39. + ngx_feature_run_force_result="$ngx_force_c99_have_variadic_macros"
  40. ngx_feature_incs="#include <stdio.h>
  41. #define var(dummy, ...) sprintf(__VA_ARGS__)"
  42. ngx_feature_path=
  43. @@ -219,6 +221,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
  44. ngx_feature="gcc variadic macros"
  45. ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS"
  46. ngx_feature_run=yes
  47. + ngx_feature_run_force_result="$ngx_force_gcc_have_variadic_macros"
  48. ngx_feature_incs="#include <stdio.h>
  49. #define var(dummy, args...) sprintf(args)"
  50. ngx_feature_path=
  51. diff --git a/auto/cc/name b/auto/cc/name
  52. index ded93f5b..7c3cb74a 100644
  53. --- a/auto/cc/name
  54. +++ b/auto/cc/name
  55. @@ -8,6 +8,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then
  56. ngx_feature="C compiler"
  57. ngx_feature_name=
  58. ngx_feature_run=yes
  59. + ngx_feature_run_force_result="$ngx_force_c_compiler"
  60. ngx_feature_incs=
  61. ngx_feature_path=
  62. ngx_feature_libs=
  63. diff --git a/auto/lib/libatomic/conf b/auto/lib/libatomic/conf
  64. index d1e484ab..37249161 100644
  65. --- a/auto/lib/libatomic/conf
  66. +++ b/auto/lib/libatomic/conf
  67. @@ -15,6 +15,7 @@ else
  68. ngx_feature="atomic_ops library"
  69. ngx_feature_name=NGX_HAVE_LIBATOMIC
  70. ngx_feature_run=yes
  71. + ngx_feature_run_force_result="$ngx_force_have_libatomic"
  72. ngx_feature_incs="#define AO_REQUIRE_CAS
  73. #include <atomic_ops.h>"
  74. ngx_feature_path=
  75. diff --git a/auto/os/darwin b/auto/os/darwin
  76. index 429468f7..1ed47cca 100644
  77. --- a/auto/os/darwin
  78. +++ b/auto/os/darwin
  79. @@ -33,6 +33,7 @@ NGX_KQUEUE_CHECKED=YES
  80. ngx_feature="kqueue's EVFILT_TIMER"
  81. ngx_feature_name="NGX_HAVE_TIMER_EVENT"
  82. ngx_feature_run=yes
  83. +ngx_feature_run_force_result="$ngx_force_have_timer_event"
  84. ngx_feature_incs="#include <sys/event.h>
  85. #include <sys/time.h>"
  86. ngx_feature_path=
  87. @@ -63,6 +64,7 @@ ngx_feature_test="int kq;
  88. ngx_feature="Darwin 64-bit kqueue millisecond timeout bug"
  89. ngx_feature_name=NGX_DARWIN_KEVENT_BUG
  90. ngx_feature_run=bug
  91. +ngx_feature_run_force_result="$ngx_force_kevent_bug"
  92. ngx_feature_incs="#include <sys/event.h>
  93. #include <sys/time.h>"
  94. ngx_feature_path=
  95. @@ -92,6 +94,7 @@ ngx_feature_test="int kq;
  96. ngx_feature="sendfile()"
  97. ngx_feature_name="NGX_HAVE_SENDFILE"
  98. ngx_feature_run=yes
  99. +ngx_feature_run_force_result="$ngx_force_have_sendfile"
  100. ngx_feature_incs="#include <sys/types.h>
  101. #include <sys/socket.h>
  102. #include <sys/uio.h>
  103. diff --git a/auto/os/linux b/auto/os/linux
  104. index 2c8a9bb8..eb4513ee 100644
  105. --- a/auto/os/linux
  106. +++ b/auto/os/linux
  107. @@ -37,6 +37,7 @@ fi
  108. ngx_feature="epoll"
  109. ngx_feature_name="NGX_HAVE_EPOLL"
  110. ngx_feature_run=yes
  111. +ngx_feature_run_force_result="$ngx_force_have_epoll"
  112. ngx_feature_incs="#include <sys/epoll.h>"
  113. ngx_feature_path=
  114. ngx_feature_libs=
  115. @@ -136,6 +137,7 @@ CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE"
  116. ngx_feature="sendfile()"
  117. ngx_feature_name="NGX_HAVE_SENDFILE"
  118. ngx_feature_run=yes
  119. +ngx_feature_run_force_result="$ngx_force_have_sendfile"
  120. ngx_feature_incs="#include <sys/sendfile.h>
  121. #include <errno.h>"
  122. ngx_feature_path=
  123. @@ -157,6 +159,7 @@ CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
  124. ngx_feature="sendfile64()"
  125. ngx_feature_name="NGX_HAVE_SENDFILE64"
  126. ngx_feature_run=yes
  127. +ngx_feature_run_force_result="$ngx_force_have_sendfile64"
  128. ngx_feature_incs="#include <sys/sendfile.h>
  129. #include <errno.h>"
  130. ngx_feature_path=
  131. @@ -175,6 +178,7 @@ ngx_include="sys/prctl.h"; . auto/include
  132. ngx_feature="prctl(PR_SET_DUMPABLE)"
  133. ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE"
  134. ngx_feature_run=yes
  135. +ngx_feature_run_force_result="$ngx_force_have_pr_set_dumpable"
  136. ngx_feature_incs="#include <sys/prctl.h>"
  137. ngx_feature_path=
  138. ngx_feature_libs=
  139. diff --git a/auto/unix b/auto/unix
  140. index 43d3b25a..3da00537 100644
  141. --- a/auto/unix
  142. +++ b/auto/unix
  143. @@ -100,6 +100,7 @@ if test -z "$NGX_KQUEUE_CHECKED"; then
  144. ngx_feature="kqueue's EVFILT_TIMER"
  145. ngx_feature_name="NGX_HAVE_TIMER_EVENT"
  146. ngx_feature_run=yes
  147. + ngx_feature_run_force_result="$ngx_force_have_timer_event"
  148. ngx_feature_incs="#include <sys/event.h>
  149. #include <sys/time.h>"
  150. ngx_feature_path=
  151. @@ -722,6 +723,7 @@ if [ $ngx_found = no ]; then
  152. ngx_feature="sys_nerr"
  153. ngx_feature_name="NGX_SYS_NERR"
  154. ngx_feature_run=value
  155. + ngx_feature_run_force_result="$ngx_force_sys_nerr"
  156. ngx_feature_incs='#include <errno.h>
  157. #include <stdio.h>'
  158. ngx_feature_path=
  159. @@ -737,6 +739,7 @@ if [ $ngx_found = no ]; then
  160. ngx_feature="_sys_nerr"
  161. ngx_feature_name="NGX_SYS_NERR"
  162. ngx_feature_run=value
  163. + ngx_feature_run_force_result="$ngx_force_sys_nerr"
  164. ngx_feature_incs='#include <errno.h>
  165. #include <stdio.h>'
  166. ngx_feature_path=
  167. @@ -806,6 +809,7 @@ ngx_feature_test="void *p; p = memalign(4096, 4096);
  168. ngx_feature="mmap(MAP_ANON|MAP_SHARED)"
  169. ngx_feature_name="NGX_HAVE_MAP_ANON"
  170. ngx_feature_run=yes
  171. +ngx_feature_run_force_result="$ngx_force_have_map_anon"
  172. ngx_feature_incs="#include <sys/mman.h>"
  173. ngx_feature_path=
  174. ngx_feature_libs=
  175. @@ -819,6 +823,7 @@ ngx_feature_test="void *p;
  176. ngx_feature='mmap("/dev/zero", MAP_SHARED)'
  177. ngx_feature_name="NGX_HAVE_MAP_DEVZERO"
  178. ngx_feature_run=yes
  179. +ngx_feature_run_force_result="$ngx_force_have_map_devzero"
  180. ngx_feature_incs="#include <sys/mman.h>
  181. #include <sys/stat.h>
  182. #include <fcntl.h>"
  183. @@ -834,6 +839,7 @@ ngx_feature_test='void *p; int fd;
  184. ngx_feature="System V shared memory"
  185. ngx_feature_name="NGX_HAVE_SYSVSHM"
  186. ngx_feature_run=yes
  187. +ngx_feature_run_force_result="$ngx_force_have_sysvshm"
  188. ngx_feature_incs="#include <sys/ipc.h>
  189. #include <sys/shm.h>"
  190. ngx_feature_path=
  191. @@ -848,6 +854,7 @@ ngx_feature_test="int id;
  192. ngx_feature="POSIX semaphores"
  193. ngx_feature_name="NGX_HAVE_POSIX_SEM"
  194. ngx_feature_run=yes
  195. +ngx_feature_run_force_result="$ngx_force_have_posix_sem"
  196. ngx_feature_incs="#include <semaphore.h>"
  197. ngx_feature_path=
  198. ngx_feature_libs=
  199. --
  200. 2.17.1