… | |
… | |
4092 | fi |
4092 | fi |
4093 | echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 |
4093 | echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 |
4094 | echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 |
4094 | echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 |
4095 | if test $ac_cv_lib_socket_socket = yes; then |
4095 | if test $ac_cv_lib_socket_socket = yes; then |
4096 | LIBS="$LIBS -lsocket" |
4096 | LIBS="$LIBS -lsocket" |
|
|
4097 | fi |
|
|
4098 | |
|
|
4099 | fi |
|
|
4100 | |
|
|
4101 | |
|
|
4102 | echo "$as_me:$LINENO: checking for sched_yield" >&5 |
|
|
4103 | echo $ECHO_N "checking for sched_yield... $ECHO_C" >&6 |
|
|
4104 | if test "${ac_cv_func_sched_yield+set}" = set; then |
|
|
4105 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|
|
4106 | else |
|
|
4107 | cat >conftest.$ac_ext <<_ACEOF |
|
|
4108 | /* confdefs.h. */ |
|
|
4109 | _ACEOF |
|
|
4110 | cat confdefs.h >>conftest.$ac_ext |
|
|
4111 | cat >>conftest.$ac_ext <<_ACEOF |
|
|
4112 | /* end confdefs.h. */ |
|
|
4113 | /* Define sched_yield to an innocuous variant, in case <limits.h> declares sched_yield. |
|
|
4114 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
|
|
4115 | #define sched_yield innocuous_sched_yield |
|
|
4116 | |
|
|
4117 | /* System header to define __stub macros and hopefully few prototypes, |
|
|
4118 | which can conflict with char sched_yield (); below. |
|
|
4119 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|
|
4120 | <limits.h> exists even on freestanding compilers. */ |
|
|
4121 | |
|
|
4122 | #ifdef __STDC__ |
|
|
4123 | # include <limits.h> |
|
|
4124 | #else |
|
|
4125 | # include <assert.h> |
|
|
4126 | #endif |
|
|
4127 | |
|
|
4128 | #undef sched_yield |
|
|
4129 | |
|
|
4130 | /* Override any gcc2 internal prototype to avoid an error. */ |
|
|
4131 | #ifdef __cplusplus |
|
|
4132 | extern "C" |
|
|
4133 | { |
|
|
4134 | #endif |
|
|
4135 | /* We use char because int might match the return type of a gcc2 |
|
|
4136 | builtin and then its argument prototype would still apply. */ |
|
|
4137 | char sched_yield (); |
|
|
4138 | /* The GNU C library defines this for functions which it implements |
|
|
4139 | to always fail with ENOSYS. Some functions are actually named |
|
|
4140 | something starting with __ and the normal name is an alias. */ |
|
|
4141 | #if defined (__stub_sched_yield) || defined (__stub___sched_yield) |
|
|
4142 | choke me |
|
|
4143 | #else |
|
|
4144 | char (*f) () = sched_yield; |
|
|
4145 | #endif |
|
|
4146 | #ifdef __cplusplus |
|
|
4147 | } |
|
|
4148 | #endif |
|
|
4149 | |
|
|
4150 | int |
|
|
4151 | main () |
|
|
4152 | { |
|
|
4153 | return f != sched_yield; |
|
|
4154 | ; |
|
|
4155 | return 0; |
|
|
4156 | } |
|
|
4157 | _ACEOF |
|
|
4158 | rm -f conftest.$ac_objext conftest$ac_exeext |
|
|
4159 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
|
4160 | (eval $ac_link) 2>conftest.er1 |
|
|
4161 | ac_status=$? |
|
|
4162 | grep -v '^ *+' conftest.er1 >conftest.err |
|
|
4163 | rm -f conftest.er1 |
|
|
4164 | cat conftest.err >&5 |
|
|
4165 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
4166 | (exit $ac_status); } && |
|
|
4167 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' |
|
|
4168 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
4169 | (eval $ac_try) 2>&5 |
|
|
4170 | ac_status=$? |
|
|
4171 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
4172 | (exit $ac_status); }; } && |
|
|
4173 | { ac_try='test -s conftest$ac_exeext' |
|
|
4174 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
4175 | (eval $ac_try) 2>&5 |
|
|
4176 | ac_status=$? |
|
|
4177 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
4178 | (exit $ac_status); }; }; then |
|
|
4179 | ac_cv_func_sched_yield=yes |
|
|
4180 | else |
|
|
4181 | echo "$as_me: failed program was:" >&5 |
|
|
4182 | sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
4183 | |
|
|
4184 | ac_cv_func_sched_yield=no |
|
|
4185 | fi |
|
|
4186 | rm -f conftest.err conftest.$ac_objext \ |
|
|
4187 | conftest$ac_exeext conftest.$ac_ext |
|
|
4188 | fi |
|
|
4189 | echo "$as_me:$LINENO: result: $ac_cv_func_sched_yield" >&5 |
|
|
4190 | echo "${ECHO_T}$ac_cv_func_sched_yield" >&6 |
|
|
4191 | if test $ac_cv_func_sched_yield = yes; then |
|
|
4192 | : |
|
|
4193 | else |
|
|
4194 | echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5 |
|
|
4195 | echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6 |
|
|
4196 | if test "${ac_cv_lib_rt_sched_yield+set}" = set; then |
|
|
4197 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|
|
4198 | else |
|
|
4199 | ac_check_lib_save_LIBS=$LIBS |
|
|
4200 | LIBS="-lrt $LIBS" |
|
|
4201 | cat >conftest.$ac_ext <<_ACEOF |
|
|
4202 | /* confdefs.h. */ |
|
|
4203 | _ACEOF |
|
|
4204 | cat confdefs.h >>conftest.$ac_ext |
|
|
4205 | cat >>conftest.$ac_ext <<_ACEOF |
|
|
4206 | /* end confdefs.h. */ |
|
|
4207 | |
|
|
4208 | /* Override any gcc2 internal prototype to avoid an error. */ |
|
|
4209 | #ifdef __cplusplus |
|
|
4210 | extern "C" |
|
|
4211 | #endif |
|
|
4212 | /* We use char because int might match the return type of a gcc2 |
|
|
4213 | builtin and then its argument prototype would still apply. */ |
|
|
4214 | char sched_yield (); |
|
|
4215 | int |
|
|
4216 | main () |
|
|
4217 | { |
|
|
4218 | sched_yield (); |
|
|
4219 | ; |
|
|
4220 | return 0; |
|
|
4221 | } |
|
|
4222 | _ACEOF |
|
|
4223 | rm -f conftest.$ac_objext conftest$ac_exeext |
|
|
4224 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
|
4225 | (eval $ac_link) 2>conftest.er1 |
|
|
4226 | ac_status=$? |
|
|
4227 | grep -v '^ *+' conftest.er1 >conftest.err |
|
|
4228 | rm -f conftest.er1 |
|
|
4229 | cat conftest.err >&5 |
|
|
4230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
4231 | (exit $ac_status); } && |
|
|
4232 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' |
|
|
4233 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
4234 | (eval $ac_try) 2>&5 |
|
|
4235 | ac_status=$? |
|
|
4236 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
4237 | (exit $ac_status); }; } && |
|
|
4238 | { ac_try='test -s conftest$ac_exeext' |
|
|
4239 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
4240 | (eval $ac_try) 2>&5 |
|
|
4241 | ac_status=$? |
|
|
4242 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
4243 | (exit $ac_status); }; }; then |
|
|
4244 | ac_cv_lib_rt_sched_yield=yes |
|
|
4245 | else |
|
|
4246 | echo "$as_me: failed program was:" >&5 |
|
|
4247 | sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
4248 | |
|
|
4249 | ac_cv_lib_rt_sched_yield=no |
|
|
4250 | fi |
|
|
4251 | rm -f conftest.err conftest.$ac_objext \ |
|
|
4252 | conftest$ac_exeext conftest.$ac_ext |
|
|
4253 | LIBS=$ac_check_lib_save_LIBS |
|
|
4254 | fi |
|
|
4255 | echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5 |
|
|
4256 | echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6 |
|
|
4257 | if test $ac_cv_lib_rt_sched_yield = yes; then |
|
|
4258 | LIBS="$LIBS -lrt" |
4097 | fi |
4259 | fi |
4098 | |
4260 | |
4099 | fi |
4261 | fi |
4100 | |
4262 | |
4101 | |
4263 | |