… | |
… | |
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 readdir_r" >&5 |
|
|
2347 | echo $ECHO_N "checking for readdir_r... $ECHO_C" >&6 |
|
|
2348 | if test "${ac_cv_readdir_r+set}" = set; then |
|
|
2349 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|
|
2350 | else |
|
|
2351 | cat >conftest.$ac_ext <<_ACEOF |
|
|
2352 | |
|
|
2353 | #include <dirent.h> |
|
|
2354 | int main(void) |
|
|
2355 | { |
|
|
2356 | DIR *dir = 0; |
|
|
2357 | struct dirent ent, *eres; |
|
|
2358 | int res = readdir_r (dir, &ent, &eres); |
|
|
2359 | return 0; |
|
|
2360 | } |
|
|
2361 | |
|
|
2362 | _ACEOF |
|
|
2363 | rm -f conftest.$ac_objext conftest$ac_exeext |
|
|
2364 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
|
2365 | (eval $ac_link) 2>conftest.er1 |
|
|
2366 | ac_status=$? |
|
|
2367 | grep -v '^ *+' conftest.er1 >conftest.err |
|
|
2368 | rm -f conftest.er1 |
|
|
2369 | cat conftest.err >&5 |
|
|
2370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2371 | (exit $ac_status); } && |
|
|
2372 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
|
|
2373 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
2374 | (eval $ac_try) 2>&5 |
|
|
2375 | ac_status=$? |
|
|
2376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2377 | (exit $ac_status); }; } && |
|
|
2378 | { ac_try='test -s conftest$ac_exeext' |
|
|
2379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
2380 | (eval $ac_try) 2>&5 |
|
|
2381 | ac_status=$? |
|
|
2382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2383 | (exit $ac_status); }; }; then |
|
|
2384 | ac_cv_readdir_r=yes |
|
|
2385 | else |
|
|
2386 | echo "$as_me: failed program was:" >&5 |
|
|
2387 | sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
2388 | |
|
|
2389 | ac_cv_readdir_r=no |
|
|
2390 | fi |
|
|
2391 | rm -f conftest.err conftest.$ac_objext \ |
|
|
2392 | conftest$ac_exeext conftest.$ac_ext |
|
|
2393 | fi |
|
|
2394 | echo "$as_me:$LINENO: result: $ac_cv_readdir_r" >&5 |
|
|
2395 | echo "${ECHO_T}$ac_cv_readdir_r" >&6 |
|
|
2396 | test $ac_cv_readdir_r = yes && |
|
|
2397 | cat >>confdefs.h <<\_ACEOF |
|
|
2398 | #define HAVE_READDIR_R 1 |
|
|
2399 | _ACEOF |
|
|
2400 | |
|
|
2401 | |
|
|
2402 | echo "$as_me:$LINENO: checking for sendfile" >&5 |
|
|
2403 | echo $ECHO_N "checking for sendfile... $ECHO_C" >&6 |
|
|
2404 | if test "${ac_cv_sendfile+set}" = set; then |
|
|
2405 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|
|
2406 | else |
|
|
2407 | cat >conftest.$ac_ext <<_ACEOF |
|
|
2408 | |
|
|
2409 | # include <sys/types.h> |
|
|
2410 | #if __linux |
|
|
2411 | # include <sys/sendfile.h> |
|
|
2412 | #elif __freebsd |
|
|
2413 | # include <sys/socket.h> |
|
|
2414 | # include <sys/uio.h> |
|
|
2415 | #elif __hpux |
|
|
2416 | # include <sys/socket.h> |
|
|
2417 | #else |
|
|
2418 | # error unsupported architecture |
|
|
2419 | #endif |
|
|
2420 | int main(void) |
|
|
2421 | { |
|
|
2422 | int fd = 0; |
|
|
2423 | off_t offset = 1; |
|
|
2424 | size_t count = 2; |
|
|
2425 | ssize_t res; |
|
|
2426 | #if __linux |
|
|
2427 | res = sendfile (fd, fd, offset, count); |
|
|
2428 | #elif __freebsd |
|
|
2429 | res = sendfile (fd, fd, offset, count, 0, &offset, 0); |
|
|
2430 | #elif __hpux |
|
|
2431 | res = sendfile (fd, fd, offset, count, 0, 0); |
|
|
2432 | #endif |
|
|
2433 | return 0; |
|
|
2434 | } |
|
|
2435 | |
|
|
2436 | _ACEOF |
|
|
2437 | rm -f conftest.$ac_objext conftest$ac_exeext |
|
|
2438 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
|
2439 | (eval $ac_link) 2>conftest.er1 |
|
|
2440 | ac_status=$? |
|
|
2441 | grep -v '^ *+' conftest.er1 >conftest.err |
|
|
2442 | rm -f conftest.er1 |
|
|
2443 | cat conftest.err >&5 |
|
|
2444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2445 | (exit $ac_status); } && |
|
|
2446 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
|
|
2447 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
2448 | (eval $ac_try) 2>&5 |
|
|
2449 | ac_status=$? |
|
|
2450 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2451 | (exit $ac_status); }; } && |
|
|
2452 | { ac_try='test -s conftest$ac_exeext' |
|
|
2453 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
|
2454 | (eval $ac_try) 2>&5 |
|
|
2455 | ac_status=$? |
|
|
2456 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
|
2457 | (exit $ac_status); }; }; then |
|
|
2458 | ac_cv_sendfile=yes |
|
|
2459 | else |
|
|
2460 | echo "$as_me: failed program was:" >&5 |
|
|
2461 | sed 's/^/| /' conftest.$ac_ext >&5 |
|
|
2462 | |
|
|
2463 | ac_cv_sendfile=no |
|
|
2464 | fi |
|
|
2465 | rm -f conftest.err conftest.$ac_objext \ |
|
|
2466 | conftest$ac_exeext conftest.$ac_ext |
|
|
2467 | fi |
|
|
2468 | echo "$as_me:$LINENO: result: $ac_cv_sendfile" >&5 |
|
|
2469 | echo "${ECHO_T}$ac_cv_sendfile" >&6 |
|
|
2470 | test $ac_cv_sendfile = yes && |
|
|
2471 | cat >>confdefs.h <<\_ACEOF |
|
|
2472 | #define HAVE_SENDFILE 1 |
2354 | _ACEOF |
2473 | _ACEOF |
2355 | |
2474 | |
2356 | |
2475 | |
2357 | cat >confcache <<\_ACEOF |
2476 | cat >confcache <<\_ACEOF |
2358 | # This file is a shell script that caches the results of configure |
2477 | # This file is a shell script that caches the results of configure |