Changeset 5583

Show
Ignore:
Timestamp:
06/09/08 12:36:02 (4 months ago)
Author:
morris
Message:

Use getpwuid() instead of getlogin(), fixes configure on certain Linux systems

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wired/trunk/configure

    r5290 r5583  
    18131813 
    18141814 
     1815 
     1816 
     1817 
    18151818# Get host 
    18161819ac_aux_dir= 
     
    30253028   { (exit 1); exit 1; }; } 
    30263029        else 
    3027                 wd_user=`perl -e "print getlogin()"` 
     3030                wd_user=`perl -e "print ((getpwuid($<))[0])"` 
     3031 
     3032                if test -z "$wd_user"; then 
     3033                        { { echo "$as_me:$LINENO: error: unable to retrieve user name, please set one with --with-user" >&5 
     3034echo "$as_me: error: unable to retrieve user name, please set one with --with-user" >&2;} 
     3035   { (exit 1); exit 1; }; } 
     3036                fi 
    30283037        fi 
    30293038fi 
     
    30623071   { (exit 1); exit 1; }; } 
    30633072        else 
    3064                 wd_group=`perl -e "print ((getgrgid(((getpwnam(getlogin()))[3])))[0])"` 
     3073                wd_group=`perl -e "print ((getgrgid(((getpwuid($<))[3])))[0])"` 
     3074 
     3075                if test -z "$wd_group"; then 
     3076                        { { echo "$as_me:$LINENO: error: unable to retrieve group name, please set one with --with-group" >&5 
     3077echo "$as_me: error: unable to retrieve group name, please set one with --with-group" >&2;} 
     3078   { (exit 1); exit 1; }; } 
     3079                fi 
    30653080        fi 
    30663081fi 
     
    30903105 
    30913106        OLD_CFLAGS="$CFLAGS" 
    3092         CFLAGS="$CFLAGS -W" 
     3107 
     3108        if test -z "$CFLAGS"; then 
     3109                CFLAGS="-W" 
     3110        else 
     3111                MATCH=`expr -- "$CFLAGS" : ".*-W"` 
     3112 
     3113                if test "$MATCH" = "0"; then 
     3114                        CFLAGS="$CFLAGS -W" 
     3115                fi 
     3116        fi 
     3117 
    30933118 
    30943119        cat >conftest.$ac_ext <<_ACEOF 
     
    31173142       } && test -s conftest.$ac_objext; then 
    31183143 
    3119                 WARNFLAGS="$WARNFLAGS -W" 
     3144 
     3145        if test -z "$WARNFLAGS"; then 
     3146                WARNFLAGS="-W" 
     3147        else 
     3148                MATCH=`expr -- "$WARNFLAGS" : ".*-W"` 
     3149 
     3150                if test "$MATCH" = "0"; then 
     3151                        WARNFLAGS="$WARNFLAGS -W" 
     3152                fi 
     3153        fi 
     3154 
    31203155 
    31213156else 
     
    31323167 
    31333168        OLD_CFLAGS="$CFLAGS" 
    3134         CFLAGS="$CFLAGS -Wall" 
     3169 
     3170        if test -z "$CFLAGS"; then 
     3171                CFLAGS="-Wall" 
     3172        else 
     3173                MATCH=`expr -- "$CFLAGS" : ".*-Wall"` 
     3174 
     3175                if test "$MATCH" = "0"; then 
     3176                        CFLAGS="$CFLAGS -Wall" 
     3177                fi 
     3178        fi 
     3179 
    31353180 
    31363181        cat >conftest.$ac_ext <<_ACEOF 
     
    31593204       } && test -s conftest.$ac_objext; then 
    31603205 
    3161                 WARNFLAGS="$WARNFLAGS -Wall" 
     3206 
     3207        if test -z "$WARNFLAGS"; then 
     3208                WARNFLAGS="-Wall" 
     3209        else 
     3210                MATCH=`expr -- "$WARNFLAGS" : ".*-Wall"` 
     3211 
     3212                if test "$MATCH" = "0"; then 
     3213                        WARNFLAGS="$WARNFLAGS -Wall" 
     3214                fi 
     3215        fi 
     3216 
    31623217 
    31633218else 
     
    31743229 
    31753230        OLD_CFLAGS="$CFLAGS" 
    3176         CFLAGS="$CFLAGS -Wno-unknown-pragmas" 
     3231 
     3232        if test -z "$CFLAGS"; then 
     3233                CFLAGS="-Wno-unknown-pragmas" 
     3234        else 
     3235                MATCH=`expr -- "$CFLAGS" : ".*-Wno-unknown-pragmas"` 
     3236 
     3237                if test "$MATCH" = "0"; then 
     3238                        CFLAGS="$CFLAGS -Wno-unknown-pragmas" 
     3239                fi 
     3240        fi 
     3241 
    31773242 
    31783243        cat >conftest.$ac_ext <<_ACEOF 
     
    32013266       } && test -s conftest.$ac_objext; then 
    32023267 
    3203                 WARNFLAGS="$WARNFLAGS -Wno-unknown-pragmas" 
     3268 
     3269        if test -z "$WARNFLAGS"; then 
     3270                WARNFLAGS="-Wno-unknown-pragmas" 
     3271        else 
     3272                MATCH=`expr -- "$WARNFLAGS" : ".*-Wno-unknown-pragmas"` 
     3273 
     3274                if test "$MATCH" = "0"; then 
     3275                        WARNFLAGS="$WARNFLAGS -Wno-unknown-pragmas" 
     3276                fi 
     3277        fi 
     3278 
    32043279 
    32053280else 
     
    32163291 
    32173292        OLD_CFLAGS="$CFLAGS" 
    3218         CFLAGS="$CFLAGS -Wno-unused-parameter" 
     3293 
     3294        if test -z "$CFLAGS"; then 
     3295                CFLAGS="-Wno-unused-parameter" 
     3296        else 
     3297                MATCH=`expr -- "$CFLAGS" : ".*-Wno-unused-parameter"` 
     3298 
     3299                if test "$MATCH" = "0"; then 
     3300                        CFLAGS="$CFLAGS -Wno-unused-parameter" 
     3301                fi 
     3302        fi 
     3303 
    32193304 
    32203305        cat >conftest.$ac_ext <<_ACEOF 
     
    32433328       } && test -s conftest.$ac_objext; then 
    32443329 
    3245                 WARNFLAGS="$WARNFLAGS -Wno-unused-parameter" 
     3330 
     3331        if test -z "$WARNFLAGS"; then 
     3332                WARNFLAGS="-Wno-unused-parameter" 
     3333        else 
     3334                MATCH=`expr -- "$WARNFLAGS" : ".*-Wno-unused-parameter"` 
     3335 
     3336                if test "$MATCH" = "0"; then 
     3337                        WARNFLAGS="$WARNFLAGS -Wno-unused-parameter" 
     3338                fi 
     3339        fi 
     3340 
    32463341 
    32473342else 
     
    32583353 
    32593354        OLD_CFLAGS="$CFLAGS" 
    3260         CFLAGS="$CFLAGS -Wsign-compare" 
     3355 
     3356        if test -z "$CFLAGS"; then 
     3357                CFLAGS="-Wsign-compare" 
     3358        else 
     3359                MATCH=`expr -- "$CFLAGS" : ".*-Wsign-compare"` 
     3360 
     3361                if test "$MATCH" = "0"; then 
     3362                        CFLAGS="$CFLAGS -Wsign-compare" 
     3363                fi 
     3364        fi 
     3365 
    32613366 
    32623367        cat >conftest.$ac_ext <<_ACEOF 
     
    32853390       } && test -s conftest.$ac_objext; then 
    32863391 
    3287                 WARNFLAGS="$WARNFLAGS -Wsign-compare" 
     3392 
     3393        if test -z "$WARNFLAGS"; then 
     3394                WARNFLAGS="-Wsign-compare" 
     3395        else 
     3396                MATCH=`expr -- "$WARNFLAGS" : ".*-Wsign-compare"` 
     3397 
     3398                if test "$MATCH" = "0"; then 
     3399                        WARNFLAGS="$WARNFLAGS -Wsign-compare" 
     3400                fi 
     3401        fi 
     3402 
    32883403 
    32893404else 
     
    33003415 
    33013416        OLD_CFLAGS="$CFLAGS" 
    3302         CFLAGS="$CFLAGS -Wstrict-prototypes" 
     3417 
     3418        if test -z "$CFLAGS"; then 
     3419                CFLAGS="-Wstrict-prototypes" 
     3420        else 
     3421                MATCH=`expr -- "$CFLAGS" : ".*-Wstrict-prototypes"` 
     3422 
     3423                if test "$MATCH" = "0"; then 
     3424                        CFLAGS="$CFLAGS -Wstrict-prototypes" 
     3425                fi 
     3426        fi 
     3427 
    33033428 
    33043429        cat >conftest.$ac_ext <<_ACEOF 
     
    33273452       } && test -s conftest.$ac_objext; then 
    33283453 
    3329                 WARNFLAGS="$WARNFLAGS -Wstrict-prototypes" 
     3454 
     3455        if test -z "$WARNFLAGS"; then 
     3456                WARNFLAGS="-Wstrict-prototypes" 
     3457        else 
     3458                MATCH=`expr -- "$WARNFLAGS" : ".*-Wstrict-prototypes"` 
     3459 
     3460                if test "$MATCH" = "0"; then 
     3461                        WARNFLAGS="$WARNFLAGS -Wstrict-prototypes" 
     3462                fi 
     3463        fi 
     3464 
    33303465 
    33313466else 
     
    33423477 
    33433478        OLD_CFLAGS="$CFLAGS" 
    3344         CFLAGS="$CFLAGS -Wmissing-prototypes" 
     3479 
     3480        if test -z "$CFLAGS"; then 
     3481                CFLAGS="-Wmissing-prototypes" 
     3482        else 
     3483                MATCH=`expr -- "$CFLAGS" : ".*-Wmissing-prototypes"` 
     3484 
     3485                if test "$MATCH" = "0"; then 
     3486                        CFLAGS="$CFLAGS -Wmissing-prototypes" 
     3487                fi 
     3488        fi 
     3489 
    33453490 
    33463491        cat >conftest.$ac_ext <<_ACEOF 
     
    33693514       } && test -s conftest.$ac_objext; then 
    33703515 
    3371                 WARNFLAGS="$WARNFLAGS -Wmissing-prototypes" 
     3516 
     3517        if test -z "$WARNFLAGS"; then 
     3518                WARNFLAGS="-Wmissing-prototypes" 
     3519        else 
     3520                MATCH=`expr -- "$WARNFLAGS" : ".*-Wmissing-prototypes"` 
     3521 
     3522                if test "$MATCH" = "0"; then 
     3523                        WARNFLAGS="$WARNFLAGS -Wmissing-prototypes" 
     3524                fi 
     3525        fi 
     3526 
    33723527 
    33733528else 
     
    33843539 
    33853540        OLD_CFLAGS="$CFLAGS" 
    3386         CFLAGS="$CFLAGS -Wmissing-declarations" 
     3541 
     3542        if test -z "$CFLAGS"; then 
     3543                CFLAGS="-Wmissing-declarations" 
     3544        else 
     3545                MATCH=`expr -- "$CFLAGS" : ".*-Wmissing-declarations"` 
     3546 
     3547                if test "$MATCH" = "0"; then 
     3548                        CFLAGS="$CFLAGS -Wmissing-declarations" 
     3549                fi 
     3550        fi 
     3551 
    33873552 
    33883553        cat >conftest.$ac_ext <<_ACEOF 
     
    34113576       } && test -s conftest.$ac_objext; then 
    34123577 
    3413                 WARNFLAGS="$WARNFLAGS -Wmissing-declarations" 
     3578 
     3579        if test -z "$WARNFLAGS"; then 
     3580                WARNFLAGS="-Wmissing-declarations" 
     3581        else 
     3582                MATCH=`expr -- "$WARNFLAGS" : ".*-Wmissing-declarations"` 
     3583 
     3584                if test "$MATCH" = "0"; then 
     3585                        WARNFLAGS="$WARNFLAGS -Wmissing-declarations" 
     3586                fi 
     3587        fi 
     3588 
    34143589 
    34153590else 
     
    34263601 
    34273602        OLD_CFLAGS="$CFLAGS" 
    3428         CFLAGS="$CFLAGS -Wredundant-decls" 
     3603 
     3604        if test -z "$CFLAGS"; then 
     3605                CFLAGS="-Wredundant-decls" 
     3606        else 
     3607                MATCH=`expr -- "$CFLAGS" : ".*-Wredundant-decls"` 
     3608 
     3609                if test "$MATCH" = "0"; then 
     3610                        CFLAGS="$CFLAGS -Wredundant-decls" 
     3611                fi 
     3612        fi 
     3613 
    34293614 
    34303615        cat >conftest.$ac_ext <<_ACEOF 
     
    34533638       } && test -s conftest.$ac_objext; then 
    34543639 
    3455                 WARNFLAGS="$WARNFLAGS -Wredundant-decls" 
     3640 
     3641        if test -z "$WARNFLAGS"; then 
     3642                WARNFLAGS="-Wredundant-decls" 
     3643        else 
     3644                MATCH=`expr -- "$WARNFLAGS" : ".*-Wredundant-decls"` 
     3645 
     3646                if test "$MATCH" = "0"; then 
     3647                        WARNFLAGS="$WARNFLAGS -Wredundant-decls" 
     3648                fi 
     3649        fi 
     3650 
    34563651 
    34573652else 
     
    35693764 
    35703765 
    3571         if test -d /usr/local/include; then 
    3572                 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
     3766        if test "$wi_include_extra_include_paths_done" != "yes"; then 
     3767                if test -d /usr/local/include; then 
     3768 
     3769        if test -z "$CPPFLAGS"; then 
     3770                CPPFLAGS="-I/usr/local/include" 
     3771        else 
     3772                MATCH=`expr -- "$CPPFLAGS" : ".*-I/usr/local/include"` 
     3773 
     3774                if test "$MATCH" = "0"; then 
     3775                        CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
     3776                fi 
    35733777        fi 
    35743778 
    3575  
    3576         if test -d /usr/local/lib; then 
    3577                 LDFLAGS="$LDFLAGS -L/usr/local/lib" 
     3779                fi 
     3780 
     3781                wi_include_extra_include_paths_done="yes" 
     3782        fi 
     3783 
     3784 
     3785        if test "$wi_include_extra_library_paths_done" != "yes"; then 
     3786                if test -d /usr/local/lib; then 
     3787 
     3788        if test -z "$LDFLAGS"; then 
     3789                LDFLAGS="-L/usr/local/lib" 
     3790        else 
     3791                MATCH=`expr -- "$LDFLAGS" : ".*-L/usr/local/lib"` 
     3792 
     3793                if test "$MATCH" = "0"; then 
     3794                        LDFLAGS="$LDFLAGS -L/usr/local/lib" 
     3795                fi 
     3796        fi 
     3797 
     3798                fi 
     3799 
     3800                wi_include_extra_library_paths_done="yes" 
    35783801        fi 
    35793802 
     
    35953818 
    35963819 
    3597         { echo "$as_me:$LINENO: checking for pow" >&5 
     3820        if test "$wi_include_math_library_done" != "yes"; then 
     3821                { echo "$as_me:$LINENO: checking for pow" >&5 
    35983822echo $ECHO_N "checking for pow... $ECHO_C" >&6; } 
    35993823if test "${ac_cv_func_pow+set}" = set; then 
     
    36803904else 
    36813905 
    3682                 { echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 
     3906                       { echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 
    36833907echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; } 
    36843908if test "${ac_cv_lib_m_sqrt+set}" = set; then 
     
    37433967if test $ac_cv_lib_m_sqrt = yes; then 
    37443968 
     3969 
     3970        if test -z "$LIBS"; then 
     3971                LIBS="-lm" 
     3972        else 
     3973                MATCH=`expr -- "$LIBS" : ".*-lm"` 
     3974 
     3975                if test "$MATCH" = "0"; then 
    37453976                        LIBS="$LIBS -lm" 
    3746  
    3747 fi 
    3748  
    3749  
    3750 fi 
    3751  
    3752  
    3753  
    3754         { echo "$as_me:$LINENO: checking for setsockopt" >&5 
     3977                fi 
     3978        fi 
     3979 
     3980 
     3981fi 
     3982 
     3983 
     3984fi 
     3985 
     3986 
     3987                wi_include_math_library_done="yes" 
     3988        fi 
     3989 
     3990 
     3991        if test "$wi_include_socket_library_done" != "yes"; then 
     3992                { echo "$as_me:$LINENO: checking for setsockopt" >&5 
    37553993echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } 
    37563994if test "${ac_cv_func_setsockopt+set}" = set; then 
     
    38374075else 
    38384076 
    3839                 { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 
     4077                       { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 
    38404078echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } 
    38414079if test "${ac_cv_lib_socket_setsockopt+set}" = set; then 
     
    39004138if test $ac_cv_lib_socket_setsockopt = yes; then 
    39014139 
     4140 
     4141        if test -z "$LIBS"; then 
     4142                LIBS="-lsocket" 
     4143        else 
     4144                MATCH=`expr -- "$LIBS" : ".*-lsocket"` 
     4145 
     4146                if test "$MATCH" = "0"; then 
    39024147                        LIBS="$LIBS -lsocket" 
    3903  
    3904 fi 
    3905  
    3906  
    3907 fi 
    3908  
    3909  
    3910  
    3911         { echo "$as_me:$LINENO: checking for gethostent" >&5 
     4148                fi 
     4149        fi 
     4150 
     4151 
     4152fi 
     4153 
     4154 
     4155fi 
     4156 
     4157 
     4158                wi_include_socket_library_done="yes" 
     4159        fi 
     4160 
     4161 
     4162        if test "$wi_include_nsl_library_done" != "yes"; then 
     4163                { echo "$as_me:$LINENO: checking for gethostent" >&5 
    39124164echo $ECHO_N "checking for gethostent... $ECHO_C" >&6; } 
    39134165if test "${ac_cv_func_gethostent+set}" = set; then 
     
    39944246else 
    39954247 
    3996                 { echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 
     4248                       { echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 
    39974249echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6; } 
    39984250if test "${ac_cv_lib_nsl_gethostent+set}" = set; then 
     
    40574309if test $ac_cv_lib_nsl_gethostent = yes; then 
    40584310 
     4311 
     4312        if test -z "$LIBS"; then 
     4313                LIBS="-lnsl" 
     4314        else 
     4315                MATCH=`expr -- "$LIBS" : ".*-lnsl"` 
     4316 
     4317                if test "$MATCH" = "0"; then 
    40594318                        LIBS="$LIBS -lnsl" 
    4060  
    4061 fi 
    4062  
    4063  
    4064 fi 
    4065  
    4066  
    4067  
    4068         { echo "$as_me:$LINENO: checking for inet_aton" >&5 
     4319                fi 
     4320        fi 
     4321 
     4322 
     4323fi 
     4324 
     4325 
     4326fi 
     4327 
     4328 
     4329                wi_include_nsl_library_done="yes" 
     4330        fi 
     4331 
     4332 
     4333        if test "$wi_include_resolv_library_done" != "yes"; then 
     4334                { echo "$as_me:$LINENO: checking for inet_aton" >&5 
    40694335echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; } 
    40704336if test "${ac_cv_func_inet_aton+set}" = set; then 
     
    41514417else 
    41524418 
    4153                 { echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 
     4419                       { echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 
    41544420echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; } 
    41554421if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then 
     
    42144480if test $ac_cv_lib_resolv_inet_aton = yes; then 
    42154481 
     4482 
     4483        if test -z "$LIBS"; then 
     4484                LIBS="-lresolv" 
     4485        else 
     4486                MATCH=`expr -- "$LIBS" : ".*-lresolv"` 
     4487 
     4488                if test "$MATCH" = "0"; then 
    42164489                        LIBS="$LIBS -lresolv" 
    4217  
    4218 fi 
    4219  
    4220  
    4221 fi 
    4222  
     4490                fi 
     4491        fi 
     4492 
     4493 
     4494fi 
     4495 
     4496 
     4497fi 
     4498 
     4499 
     4500                wi_include_resolv_library_done="yes" 
     4501        fi 
    42234502 
    42244503ac_ext=c 
     
    48595138 
    48605139 
    4861  
    4862         if test "$_wi_ssl_paths_added" != yes ; then 
     5140        if test "$wi_include_crypto_library_done" != "yes"; then 
     5141 
     5142        if test "$wi_include_extra_ssl_paths_done" != "yes"; then 
    48635143                if test -d /usr/local/ssl/include; then 
     5144 
     5145        if test -z "$CPPFLAGS"; then 
     5146                CPPFLAGS="-I/usr/local/ssl/include" 
     5147        else 
     5148                MATCH=`expr -- "$CPPFLAGS" : ".*-I/usr/local/ssl/include"` 
     5149 
     5150                if test "$MATCH" = "0"; then 
    48645151                        CPPFLAGS="$CPPFLAGS -I/usr/local/ssl/include" 
    48655152                fi 
     5153        fi 
     5154 
     5155                fi 
    48665156 
    48675157                if test -d /usr/kerberos/include; then 
     5158 
     5159        if test -z "$CPPFLAGS"; then 
     5160                CPPFLAGS="-I/usr/kerberos/include" 
     5161        else 
     5162                MATCH=`expr -- "$CPPFLAGS" : ".*-I/usr/kerberos/include"` 
     5163 
     5164                if test "$MATCH" = "0"; then 
    48685165                        CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 
    48695166                fi 
     5167        fi 
     5168 
     5169                fi 
    48705170 
    48715171                if test -d /usr/local/ssl/lib; then 
     5172 
     5173        if test -z "$LDFLAGS"; then 
     5174                LDFLAGS="-L/usr/local/ssl/lib" 
     5175        else 
     5176                MATCH=`expr -- "$LDFLAGS" : ".*-L/usr/local/ssl/lib"` 
     5177 
     5178                if test "$MATCH" = "0"; then 
    48725179                        LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" 
    48735180                fi 
    48745181        fi 
    48755182 
    4876         _wi_ssl_paths_added=yes 
     5183                fi 
     5184 
     5185                wi_include_extra_ssl_paths_done="yes" 
     5186        fi 
    48775187 
    48785188 
     
    50185328_ACEOF 
    50195329 
    5020                 { echo "$as_me:$LINENO: checking for MD5_Init in -lcrypto" >&5 
     5330                       { echo "$as_me:$LINENO: checking for MD5_Init in -lcrypto" >&5 
    50215331echo $ECHO_N "checking for MD5_Init in -lcrypto... $ECHO_C" >&6; } 
    50225332if test "${ac_cv_lib_crypto_MD5_Init+set}" = set; then 
     
    50815391if test $ac_cv_lib_crypto_MD5_Init = yes; then 
    50825392 
     5393 
     5394        if test -z "$LIBS"; then 
     5395                LIBS="-lcrypto" 
     5396        else 
     5397                MATCH=`expr -- "$LIBS" : ".*-lcrypto"` 
     5398 
     5399                if test "$MATCH" = "0"; then 
    50835400                        LIBS="$LIBS -lcrypto" 
     5401                fi 
     5402        fi 
     5403 
    50845404 
    50855405else 
     
    51235443 
    51245444 
    5125  
    5126  
    5127         if test "$_wi_ssl_paths_added" != yes ; then 
     5445                wi_include_crypto_library_done="yes" 
     5446        fi 
     5447 
     5448 
     5449        if test "$wi_include_ssl_library_done" != "yes"; then 
     5450 
     5451        if test "$wi_include_extra_ssl_paths_done" != "yes"; then 
    51285452                if test -d /usr/local/ssl/include; then 
     5453 
     5454        if test -z "$CPPFLAGS"; then 
     5455                CPPFLAGS="-I/usr/local/ssl/include" 
     5456        else 
     5457                MATCH=`expr -- "$CPPFLAGS" : ".*-I/usr/local/ssl/include"` 
     5458 
     5459                if test "$MATCH" = "0"; then 
    51295460                        CPPFLAGS="$CPPFLAGS -I/usr/local/ssl/include" 
    51305461                fi 
     5462        fi 
     5463 
     5464                fi 
    51315465 
    51325466                if test -d /usr/kerberos/include; then 
     5467 
     5468        if test -z "$CPPFLAGS"; then 
     5469                CPPFLAGS="-I/usr/kerberos/include" 
     5470        else 
     5471                MATCH=`expr -- "$CPPFLAGS" : ".*-I/usr/kerberos/include"` 
     5472 
     5473                if test "$MATCH" = "0"; then 
    51335474                        CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 
    51345475                fi 
     5476        fi 
     5477 
     5478                fi 
    51355479 
    51365480                if test -d /usr/local/ssl/lib; then 
     5481 
     5482        if test -z "$LDFLAGS"; then 
     5483                LDFLAGS="-L/usr/local/ssl/lib" 
     5484        else 
     5485                MATCH=`expr -- "$LDFLAGS" : ".*-L/usr/local/ssl/lib"` 
     5486 
     5487                if test "$MATCH" = "0"; then 
    51375488                        LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" 
    51385489                fi 
    51395490        fi 
    51405491 
    5141         _wi_ssl_paths_added=yes 
     5492                fi 
     5493 
     5494                wi_include_extra_ssl_paths_done="yes" 
     5495        fi 
    51425496 
    51435497 
     
    52835637_ACEOF 
    52845638 
    5285                 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 
     5639                       { echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 
    52865640echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6; } 
    52875641if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then 
     
    53465700if test $ac_cv_lib_ssl_SSL_library_init = yes; then 
    53475701 
     5702 
     5703        if test -z "$LIBS"; then 
     5704                LIBS="-lssl" 
     5705        else 
     5706                MATCH=`expr -- "$LIBS" : ".*-lssl"` 
     5707 
     5708                if test "$MATCH" = "0"; then 
    53485709                        LIBS="$LIBS -lssl" 
     5710                fi 
     5711        fi 
     5712 
    53495713 
    53505714else 
     
    53885752 
    53895753 
    5390  
     5754                wi_include_ssl_library_done="yes" 
     5755        fi 
     5756 
     5757 
     5758        if test "$wi_include_coreservices_framework_done" != "yes"; then 
    53915759 
    53925760for ac_header in CoreServices/CoreServices.h 
     
    55305898_ACEOF 
    55315899 
    5532                 LIBS="$LIBS -framework CoreServices -framework Carbon" 
     5900 
     5901        if test -z "$LIBS"; then 
     5902                LIBS="-framework CoreServices" 
     5903        else 
     5904                MATCH=`expr -- "$LIBS" : ".*-framework CoreServices"` 
     5905 
     5906                if test "$MATCH" = "0"; then 
     5907                        LIBS="$LIBS -framework CoreServices" 
     5908                fi 
     5909        fi 
     5910 
     5911 
     5912        if test -z "$LIBS"; then 
     5913                LIBS="-framework Carbon" 
     5914        else 
     5915                MATCH=`expr -- "$LIBS" : ".*-framework Carbon"` 
     5916 
     5917                if test "$MATCH" = "0"; then 
     5918                        LIBS="$LIBS -framework Carbon" 
     5919                fi 
     5920        fi 
     5921 
    55335922 
    55345923fi 
     
    55375926 
    55385927 
    5539  
    5540         case $host in 
    5541                 *-solaris*) 
     5928                wi_include_coreservices_framework_done="yes" 
     5929        fi 
     5930 
     5931 
     5932        if test "$wi_include_pthreads_done" != "yes"; then 
     5933                case $host in 
     5934                        *-solaris*) 
    55425935 
    55435936cat >>confdefs.h <<\_ACEOF 
     
    55455938_ACEOF 
    55465939 
    5547                         ;; 
    5548         esac 
     5940                               ;; 
     5941               esac 
    55495942 
    55505943 
     
    56896082_ACEOF 
    56906083 
    5691                 { echo "$as_me:$LINENO: checking for pthreads" >&5 
     6084                       { echo "$as_me:$LINENO: checking for pthreads" >&5 
    56926085echo $ECHO_N "checking for pthreads... $ECHO_C" >&6; } 
    56936086 
    56946087 
    5695         if test "$_wi_pthreads_found" != yes ; then 
     6088        if test "$wi_pthreads_found" != "yes"; then 
    56966089                OLD_LIBS="$LIBS" 
    5697                 LIBS=" $LIBS" 
     6090 
     6091        if test -z "$LIBS"; then 
     6092                LIBS="" 
     6093        else 
     6094                MATCH=`expr -- "$LIBS" : ".*"` 
     6095 
     6096                if test "$MATCH" = "0"; then 
     6097                        LIBS="$LIBS " 
     6098                fi 
     6099        fi 
     6100 
    56986101 
    56996102                if test "$cross_compiling" = yes; then 
     
    57476150       $as_test_x conftest$ac_exeext; then 
    57486151 
    5749                                 _wi_pthreads_test=yes 
     6152                                wi_pthreads_test=yes 
    57506153 
    57516154else 
     
    57546157 
    57556158 
    5756                                 _wi_pthreads_test=no 
     6159                                wi_pthreads_test=no 
    57576160 
    57586161fi 
     
    58116214  (exit $ac_status); }; }; then 
    58126215 
    5813                         _wi_pthreads_test=yes 
     6216                        wi_pthreads_test=yes 
    58146217 
    58156218else 
     
    58206223( exit $ac_status ) 
    58216224 
    5822                         _wi_pthreads_test=no 
     6225                        wi_pthreads_test=no 
    58236226 
    58246227fi 
     
    58306233                LIBS="$OLD_LIBS" 
    58316234 
    5832                 if test "$_wi_pthreads_test" = yes ; then 
    5833                         _wi_pthreads_found=yes 
    5834                         _wi_pthreads_libs="" 
     6235                if test "$wi_pthreads_test" = "yes"; then 
     6236                        wi_pthreads_found="yes" 
     6237                        wi_pthreads_libs="" 
    58356238                fi 
    58366239        fi 
    58376240 
    58386241 
    5839         if test "$_wi_pthreads_found" != yes ; then 
     6242        if test "$wi_pthreads_found" != "yes"; then 
    58406243                OLD_LIBS="$LIBS" 
    5841                 LIBS="-pthread $LIBS" 
     6244 
     6245        if test -z "$LIBS"; then 
     6246                LIBS="-pthread" 
     6247        else 
     6248                MATCH=`expr -- "$LIBS" : ".*-pthread"` 
     6249 
     6250                if test "$MATCH" = "0"; then 
     6251                        LIBS="$LIBS -pthread" 
     6252                fi 
     6253        fi 
     6254 
    58426255 
    58436256                if test "$cross_compiling" = yes; then 
     
    58916304       $as_test_x conftest$ac_exeext; then 
    58926305 
    5893                                 _wi_pthreads_test=yes 
     6306                                wi_pthreads_test=yes 
    58946307 
    58956308else 
     
    58986311 
    58996312 
    5900                                 _wi_pthreads_test=no 
     6313                                wi_pthreads_test=no 
    59016314 
    59026315fi 
     
    59556368  (exit $ac_status); }; }; then 
    59566369 
    5957                         _wi_pthreads_test=yes 
     6370                        wi_pthreads_test=yes 
    59586371 
    59596372else 
     
    59646377( exit $ac_status ) 
    59656378 
    5966                         _wi_pthreads_test=no 
     6379                        wi_pthreads_test=no 
    59676380 
    59686381fi 
     
    59746387                LIBS="$OLD_LIBS" 
    59756388 
    5976                 if test "$_wi_pthreads_test" = yes ; then 
    5977                         _wi_pthreads_found=yes 
    5978                         _wi_pthreads_libs="-pthread" 
     6389                if test "$wi_pthreads_test" = "yes"; then 
     6390                        wi_pthreads_found="yes" 
     6391                        wi_pthreads_libs="-pthread" 
    59796392                fi 
    59806393        fi 
    59816394 
    59826395 
    5983         if test "$_wi_pthreads_found" != yes ; then 
     6396        if test "$wi_pthreads_found" != "yes"; then 
    59846397                OLD_LIBS="$LIBS" 
    5985                 LIBS="-lpthread $LIBS" 
     6398 
     6399        if test -z "$LIBS"; then 
     6400                LIBS="-lpthread" 
     6401        else 
     6402                MATCH=`expr -- "$LIBS" : ".*-lpthread"` 
     6403 
     6404                if test "$MATCH" = "0"; then 
     6405                        LIBS="$LIBS -lpthread" 
     6406                fi 
     6407        fi 
     6408 
    59866409 
    59876410                if test "$cross_compiling" = yes; then 
     
    60356458       $as_test_x conftest$ac_exeext; then 
    60366459 
    6037                                 _wi_pthreads_test=yes 
     6460                                wi_pthreads_test=yes 
    60386461 
    60396462else 
     
    60426465 
    60436466 
    6044                                 _wi_pthreads_test=no 
     6467                                wi_pthreads_test=no 
    60456468 
    60466469fi 
     
    60996522  (exit $ac_status); }; }; then 
    61006523 
    6101                         _wi_pthreads_test=yes 
     6524                        wi_pthreads_test=yes 
    61026525 
    61036526else 
     
    61086531( exit $ac_status ) 
    61096532 
    6110                         _wi_pthreads_test=no 
     6533                        wi_pthreads_test=no 
    61116534 
    61126535fi 
     
    61186541                LIBS="$OLD_LIBS" 
    61196542 
    6120                 if test "$_wi_pthreads_test" = yes ; then 
    6121                         _wi_pthreads_found=yes 
    6122                         _wi_pthreads_libs="-lpthread" 
     6543                if test "$wi_pthreads_test" = "yes"; then 
     6544                        wi_pthreads_found="yes" 
     6545                        wi_pthreads_libs="-lpthread" 
    61236546                fi 
    61246547        fi 
    61256548 
    61266549 
    6127                 if test "$_wi_pthreads_found" = yes ; then 
    6128                         { echo "$as_me:$LINENO: result: yes" >&5 
     6550                       if test "$wi_pthreads_found" = "yes"; then 
     6551                               { echo "$as_me:$LINENO: result: yes" >&5 
    61296552echo "${ECHO_T}yes" >&6; } 
    6130                         LIBS="$_wi_pthreads_libs $LIBS" 
    6131                 else 
    6132                         { echo "$as_me:$LINENO: result: no" >&5 
     6553 
     6554        if test -z "$LIBS"; then 
     6555                LIBS="$wi_pthreads_libs" 
     6556        else 
     6557                MATCH=`expr -- "$LIBS" : ".*$wi_pthreads_libs"` 
     6558 
     6559                if test "$MATCH" = "0"; then 
     6560                        LIBS="$LIBS $wi_pthreads_libs" 
     6561                fi 
     6562        fi 
     6563 
     6564                        else 
     6565                                { echo "$as_me:$LINENO: result: no" >&5 
    61336566echo "${ECHO_T}no" >&6; } 
     6567                                { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 
     6568echo "$as_me: error: could not locate pthreads" >&2;} 
     6569   { (exit 1); exit 1; }; } 
     6570                        fi 
     6571 
     6572else 
     6573 
    61346574                        { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 
    61356575echo "$as_me: error: could not locate pthreads" >&2;} 
    61366576   { (exit 1); exit 1; }; } 
    6137                 fi 
    6138  
    6139 else 
    6140  
    6141                 { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 
    6142 echo "$as_me: error: could not locate pthreads" >&2;} 
    6143    { (exit 1); exit 1; }; } 
    61446577 
    61456578fi 
     
    61476580done 
    61486581 
     6582 
     6583                wi_include_pthreads_done="yes" 
     6584        fi 
    61496585 
    61506586 
  • wired/trunk/configure.in

    r5290 r5583  
    4848                AC_MSG_ERROR([no such user "$with_user", please set another --with-user]) 
    4949        else 
    50                 wd_user=`perl -e "print getlogin()"` 
     50                wd_user=`perl -e "print ((getpwuid($<))[[0]])"` 
     51                 
     52                if test -z "$wd_user"; then 
     53                        AC_MSG_ERROR([unable to retrieve user name, please set one with --with-user]) 
     54                fi 
    5155        fi 
    5256fi 
     
    7175  &