Changeset 3469
- Timestamp:
- 01/10/06 19:25:25 (3 years ago)
- Files:
-
- wired/trunk/configure (modified) (18 diffs)
- wired/trunk/configure.in (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/trunk/configure
r3446 r3469 2502 2502 fi 2503 2503 2504 2505 if test "$cross_compiling" = yes; then 2506 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling 2507 See \`config.log' for more details." >&5 2508 echo "$as_me: error: cannot run test program while cross compiling 2509 See \`config.log' for more details." >&2;} 2510 { (exit 1); exit 1; }; } 2511 else 2512 cat >conftest.$ac_ext <<_ACEOF 2513 /* confdefs.h. */ 2514 _ACEOF 2515 cat confdefs.h >>conftest.$ac_ext 2516 cat >>conftest.$ac_ext <<_ACEOF 2517 /* end confdefs.h. */ 2518 2519 #include <sys/types.h> 2520 #include <pwd.h> 2521 int main(void) { 2522 struct passwd *pwd = getpwnam("$wd_user"); 2523 if(!pwd) 2524 return 1; 2525 return 0; 2526 } 2527 2528 _ACEOF 2529 rm -f conftest$ac_exeext 2530 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 2531 (eval $ac_link) 2>&5 2532 ac_status=$? 2533 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 2535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2536 (eval $ac_try) 2>&5 2537 ac_status=$? 2538 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2539 (exit $ac_status); }; }; then 2540 : 2541 else 2542 echo "$as_me: program exited with status $ac_status" >&5 2543 echo "$as_me: failed program was:" >&5 2544 sed 's/^/| /' conftest.$ac_ext >&5 2545 2546 ( exit $ac_status ) 2547 2504 perl -e "exit(!defined(getpwnam('$wd_user')))" 2505 2506 if test $? = 1; then 2548 2507 if test -n "$with_user"; then 2549 2508 { { echo "$as_me:$LINENO: error: no such user \"$with_user\", please set another --with-user" >&5 … … 2553 2512 wd_user=`id -un` 2554 2513 fi 2555 2556 fi2557 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext2558 2514 fi 2559 2515 … … 2585 2541 fi 2586 2542 2587 if test "$cross_compiling" = yes; then 2588 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling 2589 See \`config.log' for more details." >&5 2590 echo "$as_me: error: cannot run test program while cross compiling 2591 See \`config.log' for more details." >&2;} 2592 { (exit 1); exit 1; }; } 2593 else 2594 cat >conftest.$ac_ext <<_ACEOF 2595 /* confdefs.h. */ 2596 _ACEOF 2597 cat confdefs.h >>conftest.$ac_ext 2598 cat >>conftest.$ac_ext <<_ACEOF 2599 /* end confdefs.h. */ 2600 2601 #include <sys/types.h> 2602 #include <grp.h> 2603 int main(void) { 2604 struct group *grp = getgrnam("$wd_group"); 2605 if(!grp) 2606 return 1; 2607 return 0; 2608 } 2609 2610 _ACEOF 2611 rm -f conftest$ac_exeext 2612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 2613 (eval $ac_link) 2>&5 2614 ac_status=$? 2615 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2616 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 2617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2618 (eval $ac_try) 2>&5 2619 ac_status=$? 2620 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2621 (exit $ac_status); }; }; then 2622 : 2623 else 2624 echo "$as_me: program exited with status $ac_status" >&5 2625 echo "$as_me: failed program was:" >&5 2626 sed 's/^/| /' conftest.$ac_ext >&5 2627 2628 ( exit $ac_status ) 2629 2543 perl -e "exit(!defined(getgrnam('$wd_group')))" 2544 2545 if test $? = 1; then 2630 2546 if test -n "$with_group"; then 2631 2547 { { echo "$as_me:$LINENO: error: no such group \"$with_group\", please set another --with-group" >&5 … … 2635 2551 wd_group=`id -un` 2636 2552 fi 2637 2638 fi2639 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext2640 2553 fi 2641 2554 … … 2663 2576 2664 2577 if test -n "$enable_warnings"; then 2578 2665 2579 2666 2580 OLD_CFLAGS="$CFLAGS" … … 5596 5510 echo $ECHO_N "checking for pthreads... $ECHO_C" >&6 5597 5511 5598 # try to compile with the following libraries linked5512 # Try to compile with the following libraries linked 5599 5513 5600 5514 if test "$wd_pthreads_found" != yes ; then 5601 # save libs5602 old_LIBS="$LIBS"5515 # Save libs 5516 OLD_LIBS="$LIBS" 5603 5517 LIBS=" $LIBS" 5604 5518 5605 # try to run it5519 # Try to run it 5606 5520 if test "$cross_compiling" = yes; then 5607 5521 … … 5620 5534 } 5621 5535 5622 int5623 main ()5624 {5625 5626 pthread_t tid;5627 5628 if(pthread_create(&tid, 0, thread, NULL) < 0)5629 return errno;5630 5631 return 0;5632 5633 ;5634 return 0;5635 }5636 5536 _ACEOF 5637 5537 rm -f conftest.$ac_objext conftest$ac_exeext … … 5673 5573 else 5674 5574 cat >conftest.$ac_ext <<_ACEOF 5675 /* confdefs.h. */5676 _ACEOF5677 cat confdefs.h >>conftest.$ac_ext5678 cat >>conftest.$ac_ext <<_ACEOF5679 /* end confdefs.h. */5680 5575 5681 5576 … … 5727 5622 fi 5728 5623 5729 # restore libs5730 LIBS="$ old_LIBS"5731 5732 # did we find something?5733 if test $wd_pthreads_test= yes ; then5624 # Restore libs 5625 LIBS="$OLD_LIBS" 5626 5627 # Did we find something? 5628 if test "$wd_pthreads_test" = yes ; then 5734 5629 wd_pthreads_found=yes 5735 5630 wd_pthreads_libs="" … … 5739 5634 5740 5635 if test "$wd_pthreads_found" != yes ; then 5741 # save libs5742 old_LIBS="$LIBS"5636 # Save libs 5637 OLD_LIBS="$LIBS" 5743 5638 LIBS="-pthread $LIBS" 5744 5639 5745 # try to run it5640 # Try to run it 5746 5641 if test "$cross_compiling" = yes; then 5747 5642 … … 5760 5655 } 5761 5656 5762 int5763 main ()5764 {5765 5766 pthread_t tid;5767 5768 if(pthread_create(&tid, 0, thread, NULL) < 0)5769 return errno;5770 5771 return 0;5772 5773 ;5774 return 0;5775 }5776 5657 _ACEOF 5777 5658 rm -f conftest.$ac_objext conftest$ac_exeext … … 5813 5694 else 5814 5695 cat >conftest.$ac_ext <<_ACEOF 5815 /* confdefs.h. */5816 _ACEOF5817 cat confdefs.h >>conftest.$ac_ext5818 cat >>conftest.$ac_ext <<_ACEOF5819 /* end confdefs.h. */5820 5696 5821 5697 … … 5867 5743 fi 5868 5744 5869 # restore libs5870 LIBS="$ old_LIBS"5871 5872 # did we find something?5873 if test $wd_pthreads_test= yes ; then5745 # Restore libs 5746 LIBS="$OLD_LIBS" 5747 5748 # Did we find something? 5749 if test "$wd_pthreads_test" = yes ; then 5874 5750 wd_pthreads_found=yes 5875 5751 wd_pthreads_libs="-pthread" … … 5879 5755 5880 5756 if test "$wd_pthreads_found" != yes ; then 5881 # save libs5882 old_LIBS="$LIBS"5757 # Save libs 5758 OLD_LIBS="$LIBS" 5883 5759 LIBS="-lpthread $LIBS" 5884 5760 5885 # try to run it5761 # Try to run it 5886 5762 if test "$cross_compiling" = yes; then 5887 5763 … … 5900 5776 } 5901 5777 5902 int5903 main ()5904 {5905 5906 pthread_t tid;5907 5908 if(pthread_create(&tid, 0, thread, NULL) < 0)5909 return errno;5910 5911 return 0;5912 5913 ;5914 return 0;5915 }5916 5778 _ACEOF 5917 5779 rm -f conftest.$ac_objext conftest$ac_exeext … … 5953 5815 else 5954 5816 cat >conftest.$ac_ext <<_ACEOF 5955 /* confdefs.h. */5956 _ACEOF5957 cat confdefs.h >>conftest.$ac_ext5958 cat >>conftest.$ac_ext <<_ACEOF5959 /* end confdefs.h. */5960 5817 5961 5818 … … 6007 5864 fi 6008 5865 6009 # restore libs6010 LIBS="$ old_LIBS"6011 6012 # did we find something?6013 if test $wd_pthreads_test= yes ; then5866 # Restore libs 5867 LIBS="$OLD_LIBS" 5868 5869 # Did we find something? 5870 if test "$wd_pthreads_test" = yes ; then 6014 5871 wd_pthreads_found=yes 6015 5872 wd_pthreads_libs="-lpthread" … … 6018 5875 6019 5876 6020 # did we find something?5877 # Did we find something? 6021 5878 if test "$wd_pthreads_found" = yes ; then 6022 5879 echo "$as_me:$LINENO: result: yes" >&5 wired/trunk/configure.in
r3446 r3469 54 54 fi 55 55 56 AC_TRY_RUN([ 57 #include <sys/types.h> 58 #include <pwd.h> 59 int main(void) { 60 struct passwd *pwd = getpwnam("$wd_user"); 61 if(!pwd) 62 return 1; 63 return 0; 64 } 65 ], [], [ 56 perl -e "exit(!defined(getpwnam('$wd_user')))" 57 58 if test $? = 1; then 66 59 if test -n "$with_user"; then 67 60 AC_MSG_ERROR([no such user "$with_user", please set another --with-user]) … … 69 62 wd_user=`id -un` 70 63 fi 71 ]) 64 fi 72 65 73 66 AC_MSG_RESULT([$wd_user]) … … 86 79 fi 87 80 88 AC_TRY_RUN([ 89 #include <sys/types.h> 90 #include <grp.h> 91 int main(void) { 92 struct group *grp = getgrnam("$wd_group"); 93 if(!grp) 94 return 1; 95 return 0; 96 } 97 ], [], [ 81 perl -e "exit(!defined(getgrnam('$wd_group')))" 82 83 if test $? = 1; then 98 84 if test -n "$with_group"; then 99 85 AC_MSG_ERROR([no such group "$with_group", please set another --with-group]) … … 101 87 wd_group=`id -un` 102 88 fi 103 ]) 89 fi 104 90 105 91 AC_MSG_RESULT([$wd_group]) … … 112 98 AC_ARG_ENABLE([warnings], AC_HELP_STRING([--enable-warnings], [enable warnings])) 113 99 114 AC_DEFUN([W R_WARNING_TRY], [100 AC_DEFUN([WD_WARNING_TRY], [ 115 101 OLD_CFLAGS="$CFLAGS" 116 102 CFLAGS="$CFLAGS $1" … … 128 114 129 115 if test -n "$enable_warnings"; then 130 W R_WARNING_TRY([-W])131 W R_WARNING_TRY([-Wall])132 W R_WARNING_TRY([-Wno-unknown-pragmas])133 W R_WARNING_TRY([-Wno-unused-parameter])134 W R_WARNING_TRY([-Wsign-compare])135 W R_WARNING_TRY([-Wstrict-prototypes])136 W R_WARNING_TRY([-Wmissing-prototypes])137 W R_WARNING_TRY([-Wmissing-declarations])138 W R_WARNING_TRY([-Wredundant-decls])116 WD_WARNING_TRY([-W]) 117 WD_WARNING_TRY([-Wall]) 118 WD_WARNING_TRY([-Wno-unknown-pragmas]) 119 WD_WARNING_TRY([-Wno-unused-parameter]) 120 WD_WARNING_TRY([-Wsign-compare]) 121 WD_WARNING_TRY([-Wstrict-prototypes]) 122 WD_WARNING_TRY([-Wmissing-prototypes]) 123 WD_WARNING_TRY([-Wmissing-declarations]) 124 WD_WARNING_TRY([-Wredundant-decls]) 139 125 140 126 AC_MSG_RESULT([$WARNFLAGS]) … … 339 325 AC_DEFUN([WD_PTHREAD_TRY], [ 340 326 if test "$wd_pthreads_found" != yes ; then 341 # save libs342 old_LIBS="$LIBS"327 # Save libs 328 OLD_LIBS="$LIBS" 343 329 LIBS="$1 $LIBS" 344 330 345 # try to run it346 AC_ TRY_RUN(WD_PTHREAD_TEST_PROGRAM, [331 # Try to run it 332 AC_RUN_IFELSE([WD_PTHREAD_TEST_PROGRAM], [ 347 333 wd_pthreads_test=yes 348 334 ], [ 349 335 wd_pthreads_test=no 350 336 ], [ 351 AC_ TRY_LINK(WD_PTHREAD_TEST_INCLUDES, WD_PTHREAD_TEST_FUNCTION, [337 AC_LINK_IFELSE([AC_LANG_SOURCE([WD_PTHREAD_TEST_INCLUDES], [WD_PTHREAD_TEST_FUNCTION])], [ 352 338 wd_pthreads_test=yes 353 339 ], [ … … 356 342 ]) 357 343 358 # restore libs359 LIBS="$ old_LIBS"360 361 # did we find something?362 if test $wd_pthreads_test= yes ; then344 # Restore libs 345 LIBS="$OLD_LIBS" 346 347 # Did we find something? 348 if test "$wd_pthreads_test" = yes ; then 363 349 wd_pthreads_found=yes 364 350 wd_pthreads_libs="$1" … … 372 358 AC_MSG_CHECKING([for pthreads]) 373 359 374 # try to compile with the following libraries linked360 # Try to compile with the following libraries linked 375 361 WD_PTHREAD_TRY([]) 376 362 WD_PTHREAD_TRY([-pthread]) 377 363 WD_PTHREAD_TRY([-lpthread]) 378 364 379 # did we find something?365 # Did we find something? 380 366 if test "$wd_pthreads_found" = yes ; then 381 367 AC_MSG_RESULT([yes])
