Changeset 5569

Show
Ignore:
Timestamp:
06/03/08 15:32:33 (4 months ago)
Author:
morris
Message:

Fix pthreads test

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/config.m4

    r5564 r5569  
    252252 
    253253AC_DEFUN([_WI_PTHREAD_TRY], [ 
    254         if test "$wi_pthreads_found" != yes; then 
     254        if test "$wi_pthreads_found" != "yes"; then 
    255255                OLD_LIBS="$LIBS" 
    256                 LIBS="$1 $LIBS" 
     256                WI_APPEND_FLAG([LIBS], $1) 
    257257 
    258258                AC_RUN_IFELSE([AC_LANG_SOURCE([_WI_PTHREAD_TEST_PROGRAM])], [ 
    259                         _wi_pthreads_test=yes 
    260                 ], [ 
    261                         _wi_pthreads_test=no 
     259                        wi_pthreads_test=yes 
     260                ], [ 
     261                        wi_pthreads_test=no 
    262262                ], [ 
    263263                        AC_LINK_IFELSE([AC_LANG_PROGRAM([_WI_PTHREAD_TEST_INCLUDES], [_WI_PTHREAD_TEST_FUNCTION])], [ 
    264                                 _wi_pthreads_test=yes 
    265                         ], [ 
    266                                 _wi_pthreads_test=no 
     264                                wi_pthreads_test=yes 
     265                        ], [ 
     266                                wi_pthreads_test=no 
    267267                        ]) 
    268268                ]) 
     
    270270                LIBS="$OLD_LIBS" 
    271271 
    272                 if test "$wi_pthreads_test" = yes; then 
    273                         wi_pthreads_found=yes 
     272                if test "$wi_pthreads_test" = "yes"; then 
     273                        wi_pthreads_found="yes" 
    274274                        wi_pthreads_libs="$1" 
    275275                fi 
     
    293293                        _WI_PTHREAD_TRY([-lpthread]) 
    294294 
    295                         if test "$wi_pthreads_found" = yes; then 
     295                        if test "$wi_pthreads_found" = "yes"; then 
    296296                                AC_MSG_RESULT([yes]) 
    297297                                WI_APPEND_FLAG([LIBS], $wi_pthreads_libs) 
  • libwired/trunk/configure

    r5564 r5569  
    59165916 
    59175917 
    5918         if test "$wi_pthreads_found" != yes; then 
     5918        if test "$wi_pthreads_found" != "yes"; then 
    59195919                OLD_LIBS="$LIBS" 
    5920                 LIBS=" $LIBS" 
     5920 
     5921        if test -z "$LIBS"; then 
     5922                LIBS="" 
     5923        elif test `expr "$LIBS" : ".*"` = 0; then 
     5924                LIBS="$LIBS " 
     5925        fi 
     5926 
    59215927 
    59225928                if test "$cross_compiling" = yes; then 
     
    59705976       $as_test_x conftest$ac_exeext; then 
    59715977 
    5972                                 _wi_pthreads_test=yes 
     5978                                wi_pthreads_test=yes 
    59735979 
    59745980else 
     
    59775983 
    59785984 
    5979                                 _wi_pthreads_test=no 
     5985                                wi_pthreads_test=no 
    59805986 
    59815987fi 
     
    60346040  (exit $ac_status); }; }; then 
    60356041 
    6036                         _wi_pthreads_test=yes 
     6042                        wi_pthreads_test=yes 
    60376043 
    60386044else 
     
    60436049( exit $ac_status ) 
    60446050 
    6045                         _wi_pthreads_test=no 
     6051                        wi_pthreads_test=no 
    60466052 
    60476053fi 
     
    60536059                LIBS="$OLD_LIBS" 
    60546060 
    6055                 if test "$wi_pthreads_test" = yes; then 
    6056                         wi_pthreads_found=yes 
     6061                if test "$wi_pthreads_test" = "yes"; then 
     6062                        wi_pthreads_found="yes" 
    60576063                        wi_pthreads_libs="" 
    60586064                fi 
     
    60606066 
    60616067 
    6062         if test "$wi_pthreads_found" != yes; then 
     6068        if test "$wi_pthreads_found" != "yes"; then 
    60636069                OLD_LIBS="$LIBS" 
    6064                 LIBS="-pthread $LIBS" 
     6070 
     6071        if test -z "$LIBS"; then 
     6072                LIBS="-pthread" 
     6073        elif test `expr "$LIBS" : ".*-pthread"` = 0; then 
     6074                LIBS="$LIBS -pthread" 
     6075        fi 
     6076 
    60656077 
    60666078                if test "$cross_compiling" = yes; then 
     
    61146126       $as_test_x conftest$ac_exeext; then 
    61156127 
    6116                                 _wi_pthreads_test=yes 
     6128                                wi_pthreads_test=yes 
    61176129 
    61186130else 
     
    61216133 
    61226134 
    6123                                 _wi_pthreads_test=no 
     6135                                wi_pthreads_test=no 
    61246136 
    61256137fi 
     
    61786190  (exit $ac_status); }; }; then 
    61796191 
    6180                         _wi_pthreads_test=yes 
     6192                        wi_pthreads_test=yes 
    61816193 
    61826194else 
     
    61876199( exit $ac_status ) 
    61886200 
    6189                         _wi_pthreads_test=no 
     6201                        wi_pthreads_test=no 
    61906202 
    61916203fi 
     
    61976209                LIBS="$OLD_LIBS" 
    61986210 
    6199                 if test "$wi_pthreads_test" = yes; then 
    6200                         wi_pthreads_found=yes 
     6211                if test "$wi_pthreads_test" = "yes"; then 
     6212                        wi_pthreads_found="yes" 
    62016213                        wi_pthreads_libs="-pthread" 
    62026214                fi 
     
    62046216 
    62056217 
    6206         if test "$wi_pthreads_found" != yes; then 
     6218        if test "$wi_pthreads_found" != "yes"; then 
    62076219                OLD_LIBS="$LIBS" 
    6208                 LIBS="-lpthread $LIBS" 
     6220 
     6221        if test -z "$LIBS"; then 
     6222                LIBS="-lpthread" 
     6223        elif test `expr "$LIBS" : ".*-lpthread"` = 0; then 
     6224                LIBS="$LIBS -lpthread" 
     6225        fi 
     6226 
    62096227 
    62106228                if test "$cross_compiling" = yes; then 
     
    62586276       $as_test_x conftest$ac_exeext; then 
    62596277 
    6260                                 _wi_pthreads_test=yes 
     6278                                wi_pthreads_test=yes 
    62616279 
    62626280else 
     
    62656283 
    62666284 
    6267                                 _wi_pthreads_test=no 
     6285                                wi_pthreads_test=no 
    62686286 
    62696287fi 
     
    63226340  (exit $ac_status); }; }; then 
    63236341 
    6324                         _wi_pthreads_test=yes 
     6342                        wi_pthreads_test=yes 
    63256343 
    63266344else 
     
    63316349( exit $ac_status ) 
    63326350 
    6333                         _wi_pthreads_test=no 
     6351                        wi_pthreads_test=no 
    63346352 
    63356353fi 
     
    63416359                LIBS="$OLD_LIBS" 
    63426360 
    6343                 if test "$wi_pthreads_test" = yes; then 
    6344                         wi_pthreads_found=yes 
     6361                if test "$wi_pthreads_test" = "yes"; then 
     6362                        wi_pthreads_found="yes" 
    63456363                        wi_pthreads_libs="-lpthread" 
    63466364                fi 
     
    63486366 
    63496367 
    6350                         if test "$wi_pthreads_found" = yes; then 
     6368                        if test "$wi_pthreads_found" = "yes"; then 
    63516369                                { echo "$as_me:$LINENO: result: yes" >&5 
    63526370echo "${ECHO_T}yes" >&6; }