… | |
… | |
1239 | |
1239 | |
1240 | |
1240 | |
1241 | |
1241 | |
1242 | |
1242 | |
1243 | |
1243 | |
1244 | ac_config_headers="$ac_config_headers aconf.h" |
1244 | ac_config_headers="$ac_config_headers config.h" |
1245 | |
1245 | |
1246 | |
1246 | |
1247 | ac_ext=c |
1247 | ac_ext=c |
1248 | ac_cpp='$CPP $CPPFLAGS' |
1248 | ac_cpp='$CPP $CPPFLAGS' |
1249 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
1249 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
… | |
… | |
2338 | echo "$as_me:$LINENO: result: $ac_cv_preadwrite" >&5 |
2338 | echo "$as_me:$LINENO: result: $ac_cv_preadwrite" >&5 |
2339 | echo "${ECHO_T}$ac_cv_preadwrite" >&6 |
2339 | echo "${ECHO_T}$ac_cv_preadwrite" >&6 |
2340 | test $ac_cv_preadwrite = yes && |
2340 | test $ac_cv_preadwrite = yes && |
2341 | cat >>confdefs.h <<\_ACEOF |
2341 | cat >>confdefs.h <<\_ACEOF |
2342 | #define HAVE_PREADWRITE 1 |
2342 | #define HAVE_PREADWRITE 1 |
|
|
2343 | _ACEOF |
|
|
2344 | |
|
|
2345 | |
|
|
2346 | echo "$as_me:$LINENO: checking for sendfile" >&5 |
|
|
2347 | echo $ECHO_N "checking for sendfile... $ECHO_C" >&6 |
|
|
2348 | if test "${ac_cv_sendfile+set}" = set; then |
|
|
2349 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|
|
2350 | else |
|
|
2351 | cat >conftest.$ac_ext <<_ACEOF |
|
|
2352 | |
|
|
2353 | # include <sys/types.h> |
|
|
2354 | #if __linux |
|
|
2355 | # include <sys/sendfile.h> |
|
|
2356 | #elif __freebsd |
|
|
2357 | # include <sys/socket.h> |
|
|
2358 | # include <sys/uio.h> |
|
|
2359 | #elif __hpux |
|
|
2360 | # include <sys/socket.h> |
|
|
2361 | #endif |
|
|
2362 | int main(void) |
|
|
2363 | { |
|
|
2364 | int fd = 0; |
|
|
2365 | off_t offset = 1; |
|
|
2366 | size_t count = 2; |
|
|
2367 | ssize_t res; |
|
|
2368 | #if __linux |
|
|
2369 | res = sendfile (fd, fd, offset, count); |
|
|
2370 | #elif __freebsd |
|
|
2371 | res = sendfile (fd, fd, offset, count, 0, &offset, 0); |
|
|
2372 | #elif __hpux |
|
|
2373 | res = sendfile (fd, fd, offset, count, 0, 0); |
|
|
2374 | #endif |
|
|
2375 | return 0; |
|
|
2376 | } |
|
|
2377 | |
|
|
2378 | _ACEOF |
|
|
2379 | rm -f conftest.$ac_objext conftest$ac_exeext |
|
|
2380 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
|
2381 | (eval $ac_link) 2>conftest.er1 |
|
|
2382 | ac_status=$? |
|
|
2383 | grep -v '^ *+' conftest.er1 >conftest.err |
|
|
2384 | rm -f conftest.er1 |
|
|
2385 | cat conftest.err >&5 |
|
|
2386 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2387 | (exit $ac_status); } && |
|
|
2388 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
|
|
2389 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
2390 | (eval $ac_try) 2>&5 |
|
|
2391 | ac_status=$? |
|
|
2392 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2393 | (exit $ac_status); }; } && |
|
|
2394 | { ac_try='test -s conftest$ac_exeext' |
|
|
2395 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
2396 | (eval $ac_try) 2>&5 |
|
|
2397 | ac_status=$? |
|
|
2398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2399 | (exit $ac_status); }; }; then |
|
|
2400 | ac_cv_sendfile=yes |
|
|
2401 | else |
|
|
2402 | echo "$as_me: failed program was:" >&5 |
|
|
2403 | sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
2404 | |
|
|
2405 | ac_cv_sendfile=no |
|
|
2406 | fi |
|
|
2407 | rm -f conftest.err conftest.$ac_objext \ |
|
|
2408 | conftest$ac_exeext conftest.$ac_ext |
|
|
2409 | fi |
|
|
2410 | echo "$as_me:$LINENO: result: $ac_cv_sendfile" >&5 |
|
|
2411 | echo "${ECHO_T}$ac_cv_sendfile" >&6 |
|
|
2412 | test $ac_cv_sendfile = yes && |
|
|
2413 | cat >>confdefs.h <<\_ACEOF |
|
|
2414 | #define HAVE_SENDFILE 1 |
2343 | _ACEOF |
2415 | _ACEOF |
2344 | |
2416 | |
2345 | |
2417 | |
2346 | cat >confcache <<\_ACEOF |
2418 | cat >confcache <<\_ACEOF |
2347 | # This file is a shell script that caches the results of configure |
2419 | # This file is a shell script that caches the results of configure |
… | |
… | |
2860 | cat >>$CONFIG_STATUS <<\_ACEOF |
2932 | cat >>$CONFIG_STATUS <<\_ACEOF |
2861 | for ac_config_target in $ac_config_targets |
2933 | for ac_config_target in $ac_config_targets |
2862 | do |
2934 | do |
2863 | case "$ac_config_target" in |
2935 | case "$ac_config_target" in |
2864 | # Handling of arguments. |
2936 | # Handling of arguments. |
2865 | "aconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS aconf.h" ;; |
2937 | "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; |
2866 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 |
2938 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 |
2867 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} |
2939 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} |
2868 | { (exit 1); exit 1; }; };; |
2940 | { (exit 1); exit 1; }; };; |
2869 | esac |
2941 | esac |
2870 | done |
2942 | done |