… | |
… | |
1242 | |
1242 | |
1243 | |
1243 | |
1244 | ac_config_headers="$ac_config_headers config.h" |
1244 | ac_config_headers="$ac_config_headers config.h" |
1245 | |
1245 | |
1246 | |
1246 | |
1247 | # Enable GNU extensions. |
|
|
1248 | # Define this here, not in acconfig's @TOP@ section, since definitions |
|
|
1249 | # in the latter don't make it into the configure-time tests. |
|
|
1250 | |
|
|
1251 | cat >>confdefs.h <<\_ACEOF |
|
|
1252 | #define _GNU_SOURCE 1 |
|
|
1253 | _ACEOF |
|
|
1254 | |
|
|
1255 | |
|
|
1256 | # do NOT define POSIX_SOURCE, since this clashes with many BSDs |
|
|
1257 | |
|
|
1258 | ac_ext=c |
1247 | ac_ext=c |
1259 | ac_cpp='$CPP $CPPFLAGS' |
1248 | ac_cpp='$CPP $CPPFLAGS' |
1260 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
1249 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
1261 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
1250 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
1262 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
1251 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
… | |
… | |
2349 | echo "$as_me:$LINENO: result: $ac_cv_preadwrite" >&5 |
2338 | echo "$as_me:$LINENO: result: $ac_cv_preadwrite" >&5 |
2350 | echo "${ECHO_T}$ac_cv_preadwrite" >&6 |
2339 | echo "${ECHO_T}$ac_cv_preadwrite" >&6 |
2351 | test $ac_cv_preadwrite = yes && |
2340 | test $ac_cv_preadwrite = yes && |
2352 | cat >>confdefs.h <<\_ACEOF |
2341 | cat >>confdefs.h <<\_ACEOF |
2353 | #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 | #else |
|
|
2362 | # error unsupported architecture |
|
|
2363 | #endif |
|
|
2364 | int main(void) |
|
|
2365 | { |
|
|
2366 | int fd = 0; |
|
|
2367 | off_t offset = 1; |
|
|
2368 | size_t count = 2; |
|
|
2369 | ssize_t res; |
|
|
2370 | #if __linux |
|
|
2371 | res = sendfile (fd, fd, offset, count); |
|
|
2372 | #elif __freebsd |
|
|
2373 | res = sendfile (fd, fd, offset, count, 0, &offset, 0); |
|
|
2374 | #elif __hpux |
|
|
2375 | res = sendfile (fd, fd, offset, count, 0, 0); |
|
|
2376 | #endif |
|
|
2377 | return 0; |
|
|
2378 | } |
|
|
2379 | |
|
|
2380 | _ACEOF |
|
|
2381 | rm -f conftest.$ac_objext conftest$ac_exeext |
|
|
2382 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
|
2383 | (eval $ac_link) 2>conftest.er1 |
|
|
2384 | ac_status=$? |
|
|
2385 | grep -v '^ *+' conftest.er1 >conftest.err |
|
|
2386 | rm -f conftest.er1 |
|
|
2387 | cat conftest.err >&5 |
|
|
2388 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2389 | (exit $ac_status); } && |
|
|
2390 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
|
|
2391 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
2392 | (eval $ac_try) 2>&5 |
|
|
2393 | ac_status=$? |
|
|
2394 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2395 | (exit $ac_status); }; } && |
|
|
2396 | { ac_try='test -s conftest$ac_exeext' |
|
|
2397 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
2398 | (eval $ac_try) 2>&5 |
|
|
2399 | ac_status=$? |
|
|
2400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2401 | (exit $ac_status); }; }; then |
|
|
2402 | ac_cv_sendfile=yes |
|
|
2403 | else |
|
|
2404 | echo "$as_me: failed program was:" >&5 |
|
|
2405 | sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
2406 | |
|
|
2407 | ac_cv_sendfile=no |
|
|
2408 | fi |
|
|
2409 | rm -f conftest.err conftest.$ac_objext \ |
|
|
2410 | conftest$ac_exeext conftest.$ac_ext |
|
|
2411 | fi |
|
|
2412 | echo "$as_me:$LINENO: result: $ac_cv_sendfile" >&5 |
|
|
2413 | echo "${ECHO_T}$ac_cv_sendfile" >&6 |
|
|
2414 | test $ac_cv_sendfile = yes && |
|
|
2415 | cat >>confdefs.h <<\_ACEOF |
|
|
2416 | #define HAVE_SENDFILE 1 |
2354 | _ACEOF |
2417 | _ACEOF |
2355 | |
2418 | |
2356 | |
2419 | |
2357 | cat >confcache <<\_ACEOF |
2420 | cat >confcache <<\_ACEOF |
2358 | # This file is a shell script that caches the results of configure |
2421 | # This file is a shell script that caches the results of configure |