Changeset 4520

Show
Ignore:
Timestamp:
02/07/07 23:06:50 (2 years ago)
Author:
morris
Message:

Update for config.m4

Files:

Legend:

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

    r4490 r4520  
    13271327 
    13281328 
     1329# Include shared macros 
     1330# config.m4 
     1331 
     1332 
     1333 
     1334 
     1335 
     1336 
     1337 
     1338 
     1339 
     1340 
     1341 
     1342 
     1343 
     1344 
     1345 
     1346 
     1347 
     1348 
     1349 
     1350 
     1351 
     1352 
     1353 
     1354 
     1355 
     1356 
     1357 
     1358 
     1359 
     1360 
     1361 
     1362 
     1363 
     1364 
     1365 
     1366 
     1367 
     1368 
     1369 
     1370 
     1371 
     1372 
     1373 
     1374 
     1375 
     1376 
     1377 
     1378 
     1379 
    13291380# Get host 
    13301381ac_aux_dir= 
     
    14271478# These are used in the Makefile 
    14281479WT_VERSION="1.0" 
    1429  
    1430  
    1431 # These are used in configure.in 
    1432  
    1433  
    14341480 
    14351481 
     
    25682614fi; 
    25692615 
    2570  
    2571  
    25722616if test -n "$enable_warnings"; then 
    25732617 
     
    30883132# Checks for additional paths 
    30893133 
    3090 # Check if we need /usr/local/{include,lib}/ 
    3091 if test -d /usr/local/include; then 
    3092         CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
    3093 fi 
    3094  
    3095 if test -d /usr/local/lib; then 
    3096         LDFLAGS="$LDFLAGS -L/usr/local/lib" 
    3097 fi 
    3098  
    3099  
    3100 # Check if we need /usr/local/ssl/{include,lib}/ 
    3101 if test -d /usr/local/ssl/include; then 
    3102         CPPFLAGS="$CPPFLAGS -I/usr/local/ssl/include" 
    3103 fi 
    3104  
    3105 if test -d /usr/local/ssl/lib; then 
    3106         LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" 
    3107 fi 
    3108  
    3109  
    3110 # Check if we need /usr/kerberos/include 
    3111 if test -d /usr/kerberos/include; then 
    3112         CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 
    3113 fi 
     3134 
     3135        if test -d /usr/local/include; then 
     3136                CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
     3137        fi 
     3138 
     3139        if test -d /usr/local/ssl/include; then 
     3140                CPPFLAGS="$CPPFLAGS -I/usr/local/ssl/include" 
     3141        fi 
     3142 
     3143        if test -d /usr/kerberos/include; then 
     3144                CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 
     3145        fi 
     3146 
     3147 
     3148        if test -d /usr/local/lib; then 
     3149                LDFLAGS="$LDFLAGS -L/usr/local/lib" 
     3150        fi 
     3151 
     3152        if test -d /usr/local/ssl/lib; then 
     3153                LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" 
     3154        fi 
     3155 
    31143156 
    31153157 
     
    31173159# Checks for libraries 
    31183160 
    3119 # Check that we have a libwired in this directory 
    3120 if ! test -f "$srcdir/libwired/configure"; then 
    3121  
    3122     { { echo "$as_me:$LINENO: error: could not locate libwired 
     3161 
     3162        if ! test -f "$srcdir/libwired/configure"; then 
     3163                { { echo "$as_me:$LINENO: error: could not locate libwired 
    31233164 
    31243165You need to download a version of libwired and place it in the same directory as this configure script" >&5 
     
    31273168You need to download a version of libwired and place it in the same directory as this configure script" >&2;} 
    31283169   { (exit 1); exit 1; }; } 
    3129  
    3130 fi 
    3131  
    3132  
    3133 # Check if we need the math library 
    3134 echo "$as_me:$LINENO: checking for pow" >&5 
     3170fi 
     3171 
     3172 
     3173        echo "$as_me:$LINENO: checking for pow" >&5 
    31353174echo $ECHO_N "checking for pow... $ECHO_C" >&6 
    31363175if test "${ac_cv_func_pow+set}" = set; then 
     
    32263265else 
    32273266 
    3228         echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 
     3267               echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 
    32293268echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 
    32303269if test "${ac_cv_lib_m_sqrt+set}" = set; then 
     
    32923331if test $ac_cv_lib_m_sqrt = yes; then 
    32933332 
    3294                 LIBS="$LIBS -lm" 
    3295  
    3296 fi 
    3297  
    3298  
    3299 fi 
    3300  
    3301  
    3302  
    3303 # Check if we need the socket library 
    3304 echo "$as_me:$LINENO: checking for setsockopt" >&5 
     3333                        LIBS="$LIBS -lm" 
     3334 
     3335fi 
     3336 
     3337 
     3338fi 
     3339 
     3340 
     3341 
     3342        echo "$as_me:$LINENO: checking for setsockopt" >&5 
    33053343echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 
    33063344if test "${ac_cv_func_setsockopt+set}" = set; then 
     
    33963434else 
    33973435 
    3398         echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 
     3436               echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 
    33993437echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 
    34003438if test "${ac_cv_lib_socket_setsockopt+set}" = set; then 
     
    34623500if test $ac_cv_lib_socket_setsockopt = yes; then 
    34633501 
    3464                 LIBS="$LIBS -lsocket" 
    3465  
    3466 fi 
    3467  
    3468  
    3469 fi 
    3470  
    3471  
    3472  
    3473 # Check if we need the network services library 
    3474 echo "$as_me:$LINENO: checking for gethostent" >&5 
     3502                        LIBS="$LIBS -lsocket" 
     3503 
     3504fi 
     3505 
     3506 
     3507fi 
     3508 
     3509 
     3510 
     3511        echo "$as_me:$LINENO: checking for gethostent" >&5 
    34753512echo $ECHO_N "checking for gethostent... $ECHO_C" >&6 
    34763513if test "${ac_cv_func_gethostent+set}" = set; then 
     
    35663603else 
    35673604 
    3568         echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 
     3605               echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 
    35693606echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6 
    35703607if test "${ac_cv_lib_nsl_gethostent+set}" = set; then 
     
    36323669if test $ac_cv_lib_nsl_gethostent = yes; then 
    36333670 
    3634                 LIBS="$LIBS -lnsl" 
    3635  
    3636 fi 
    3637  
    3638  
    3639 fi 
    3640  
    3641  
    3642  
    3643 # Check for the OpenSSL crypto library 
     3671                        LIBS="$LIBS -lnsl" 
     3672 
     3673fi 
     3674 
     3675 
     3676fi 
     3677 
     3678 
     3679 
     3680        echo "$as_me:$LINENO: checking for inet_aton" >&5 
     3681echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 
     3682if test "${ac_cv_func_inet_aton+set}" = set; then 
     3683  echo $ECHO_N "(cached) $ECHO_C" >&6 
     3684else 
     3685  cat >conftest.$ac_ext <<_ACEOF 
     3686/* confdefs.h.  */ 
     3687_ACEOF 
     3688cat confdefs.h >>conftest.$ac_ext 
     3689cat >>conftest.$ac_ext <<_ACEOF 
     3690/* end confdefs.h.  */ 
     3691/* Define inet_aton to an innocuous variant, in case <limits.h> declares inet_aton. 
     3692   For example, HP-UX 11i <limits.h> declares gettimeofday.  */ 
     3693#define inet_aton innocuous_inet_aton 
     3694 
     3695/* System header to define __stub macros and hopefully few prototypes, 
     3696    which can conflict with char inet_aton (); below. 
     3697    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 
     3698    <limits.h> exists even on freestanding compilers.  */ 
     3699 
     3700#ifdef __STDC__ 
     3701# include <limits.h> 
     3702#else 
     3703# include <assert.h> 
     3704#endif 
     3705 
     3706#undef inet_aton 
     3707 
     3708/* Override any gcc2 internal prototype to avoid an error.  */ 
     3709#ifdef __cplusplus 
     3710extern "C" 
     3711
     3712#endif 
     3713/* We use char because int might match the return type of a gcc2 
     3714   builtin and then its argument prototype would still apply.  */ 
     3715char inet_aton (); 
     3716/* The GNU C library defines this for functions which it implements 
     3717    to always fail with ENOSYS.  Some functions are actually named 
     3718    something starting with __ and the normal name is an alias.  */ 
     3719#if defined (__stub_inet_aton) || defined (__stub___inet_aton) 
     3720choke me 
     3721#else 
     3722char (*f) () = inet_aton; 
     3723#endif 
     3724#ifdef __cplusplus 
     3725
     3726#endif 
     3727 
     3728int 
     3729main () 
     3730
     3731return f != inet_aton; 
     3732  ; 
     3733  return 0; 
     3734
     3735_ACEOF 
     3736rm -f conftest.$ac_objext conftest$ac_exeext 
     3737if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
     3738  (eval $ac_link) 2>conftest.er1 
     3739  ac_status=$? 
     3740  grep -v '^ *+' conftest.er1 >conftest.err 
     3741  rm -f conftest.er1 
     3742  cat conftest.err >&5 
     3743  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3744  (exit $ac_status); } && 
     3745         { ac_try='test -z "$ac_c_werror_flag" 
     3746                         || test ! -s conftest.err' 
     3747  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3748  (eval $ac_try) 2>&5 
     3749  ac_status=$? 
     3750  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3751  (exit $ac_status); }; } && 
     3752         { ac_try='test -s conftest$ac_exeext' 
     3753  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3754  (eval $ac_try) 2>&5 
     3755  ac_status=$? 
     3756  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3757  (exit $ac_status); }; }; then 
     3758  ac_cv_func_inet_aton=yes 
     3759else 
     3760  echo "$as_me: failed program was:" >&5 
     3761sed 's/^/| /' conftest.$ac_ext >&5 
     3762 
     3763ac_cv_func_inet_aton=no 
     3764fi 
     3765rm -f conftest.err conftest.$ac_objext \ 
     3766      conftest$ac_exeext conftest.$ac_ext 
     3767fi 
     3768echo "$as_me:$LINENO: result: $ac_cv_func_inet_aton" >&5 
     3769echo "${ECHO_T}$ac_cv_func_inet_aton" >&6 
     3770if test $ac_cv_func_inet_aton = yes; then 
     3771  : 
     3772else 
     3773 
     3774                echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 
     3775echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6 
     3776if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then 
     3777  echo $ECHO_N "(cached) $ECHO_C" >&6 
     3778else 
     3779  ac_check_lib_save_LIBS=$LIBS 
     3780LIBS="-lresolv  $LIBS" 
     3781cat >conftest.$ac_ext <<_ACEOF 
     3782/* confdefs.h.  */ 
     3783_ACEOF 
     3784cat confdefs.h >>conftest.$ac_ext 
     3785cat >>conftest.$ac_ext <<_ACEOF 
     3786/* end confdefs.h.  */ 
     3787 
     3788/* Override any gcc2 internal prototype to avoid an error.  */ 
     3789#ifdef __cplusplus 
     3790extern "C" 
     3791#endif 
     3792/* We use char because int might match the return type of a gcc2 
     3793   builtin and then its argument prototype would still apply.  */ 
     3794char inet_aton (); 
     3795int 
     3796main () 
     3797
     3798inet_aton (); 
     3799  ; 
     3800  return 0; 
     3801
     3802_ACEOF 
     3803rm -f conftest.$ac_objext conftest$ac_exeext 
     3804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
     3805  (eval $ac_link) 2>conftest.er1 
     3806  ac_status=$? 
     3807  grep -v '^ *+' conftest.er1 >conftest.err 
     3808  rm -f conftest.er1 
     3809  cat conftest.err >&5 
     3810  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3811  (exit $ac_status); } && 
     3812         { ac_try='test -z "$ac_c_werror_flag" 
     3813                         || test ! -s conftest.err' 
     3814  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3815  (eval $ac_try) 2>&5 
     3816  ac_status=$? 
     3817  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3818  (exit $ac_status); }; } && 
     3819         { ac_try='test -s conftest$ac_exeext' 
     3820  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3821  (eval $ac_try) 2>&5 
     3822  ac_status=$? 
     3823  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3824  (exit $ac_status); }; }; then 
     3825  ac_cv_lib_resolv_inet_aton=yes 
     3826else 
     3827  echo "$as_me: failed program was:" >&5 
     3828sed 's/^/| /' conftest.$ac_ext >&5 
     3829 
     3830ac_cv_lib_resolv_inet_aton=no 
     3831fi 
     3832rm -f conftest.err conftest.$ac_objext \ 
     3833      conftest$ac_exeext conftest.$ac_ext 
     3834LIBS=$ac_check_lib_save_LIBS 
     3835fi 
     3836echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 
     3837echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6 
     3838if test $ac_cv_lib_resolv_inet_aton = yes; then 
     3839 
     3840                        LIBS="$LIBS -lresolv" 
     3841 
     3842fi 
     3843 
     3844 
     3845fi 
     3846 
     3847 
    36443848ac_ext=c 
    36453849ac_cpp='$CPP $CPPFLAGS' 
     
    41284332 
    41294333done 
     4334 
    41304335 
    41314336 
     
    42764481_ACEOF 
    42774482 
    4278         echo "$as_me:$LINENO: checking for MD5_Init in -lcrypto" >&5 
     4483               echo "$as_me:$LINENO: checking for MD5_Init in -lcrypto" >&5 
    42794484echo $ECHO_N "checking for MD5_Init in -lcrypto... $ECHO_C" >&6 
    42804485if test "${ac_cv_lib_crypto_MD5_Init+set}" = set; then 
     
    43424547if test $ac_cv_lib_crypto_MD5_Init = yes; then 
    43434548 
    4344                 LIBS="$LIBS -lcrypto" 
     4549                       LIBS="$LIBS -lcrypto" 
    43454550 
    43464551else 
     
    43854590 
    43864591 
    4387 # Check for the OpenSSL ssl library 
    43884592 
    43894593for ac_header in openssl/ssl.h 
     
    45324736_ACEOF 
    45334737 
    4534         echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 
     4738               echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 
    45354739echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6 
    45364740if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then 
     
    45984802if test $ac_cv_lib_ssl_SSL_library_init = yes; then 
    45994803 
    4600                 LIBS="$LIBS -lssl" 
     4804                       LIBS="$LIBS -lssl" 
    46014805 
    46024806else 
     
    46414845 
    46424846 
    4643 # Check for CoreServices (Mac OS X) 
    46444847 
    46454848for ac_header in CoreServices/CoreServices.h 
     
    47884991_ACEOF 
    47894992 
    4790         LIBS="$LIBS -framework CoreServices -framework Carbon" 
     4993               LIBS="$LIBS -framework CoreServices -framework Carbon" 
    47914994 
    47924995fi 
     
    47964999 
    47975000 
    4798 ####################################################################### 
    4799 # Check for host-specific semantics 
    4800  
    4801 case $host in 
    4802         *-solaris*) 
     5001        case $host in 
     5002                *-solaris*) 
    48035003 
    48045004cat >>confdefs.h <<\_ACEOF 
     
    48065006_ACEOF 
    48075007 
    4808                 ;; 
    4809 esac 
    4810  
    4811  
    4812 ####################################################################### 
    4813 # Checks for pthread 
    4814  
    4815 # pthreads test includes 
    4816  
    4817  
    4818  
    4819 # pthreads test function 
    4820  
    4821  
    4822  
    4823 # pthreads test program 
    4824  
    4825  
    4826  
    4827 # Try to compile the pthreads program 
    4828  
    4829  
    4830  
    4831 # Check for pthreads 
     5008                        ;; 
     5009        esac 
     5010 
     5011 
     5012 
     5013 
     5014 
     5015 
     5016 
     5017 
     5018 
     5019 
     5020 
     5021 
     5022 
    48325023 
    48335024for ac_header in pthread.h 
     
    49765167_ACEOF 
    49775168 
    4978         echo "$as_me:$LINENO: checking for pthreads" >&5 
     5169               echo "$as_me:$LINENO: checking for pthreads" >&5 
    49795170echo $ECHO_N "checking for pthreads... $ECHO_C" >&6 
    49805171 
    4981         # Try to compile with the following libraries linked 
    4982  
    4983         if test "$wt_pthreads_found" != yes ; then 
    4984                 # Save libs 
    4985                 OLD_LIBS="$LIBS" 
    4986                 LIBS="-lpthread $LIBS" 
    4987  
    4988                 # Try to run it 
    4989                 if test "$cross_compiling" = yes; then 
    4990  
    4991                         cat >conftest.$ac_ext <<_ACEOF 
     5172 
     5173                if test "$_wi_pthreads_found" != yes ; then 
     5174                        OLD_LIBS="$LIBS" 
     5175                        LIBS=" $LIBS" 
     5176 
     5177                        if test "$cross_compiling" = yes; then 
     5178 
     5179                                cat >conftest.$ac_ext <<_ACEOF 
    49925180/* confdefs.h.  */ 
    49935181_ACEOF 
     
    49965184/* end confdefs.h.  */ 
    49975185 
    4998         #include <pthread.h> 
    4999         #include <errno.h> 
    5000  
    5001         void * thread(void *arg) { 
    5002                 return NULL; 
    5003        
     5186               #include <pthread.h> 
     5187               #include <errno.h> 
     5188 
     5189               void * thread(void *arg) { 
     5190                       return NULL; 
     5191               
    50045192 
    50055193int 
     
    50075195{ 
    50085196 
    5009         pthread_t tid; 
    5010  
    5011         if(pthread_create(&tid, 0, thread, NULL) < 0) 
    5012                 return errno; 
    5013  
    5014         return 0; 
     5197               pthread_t tid; 
     5198 
     5199               if(pthread_create(&tid, 0, thread, NULL) < 0) 
     5200                       return errno; 
     5201 
     5202               return 0; 
    50155203 
    50165204  ; 
     
    50415229  (exit $ac_status); }; }; then 
    50425230 
    5043                                 wt_pthreads_test=yes 
     5231                                       _wi_pthreads_test=yes 
    50445232 
    50455233else 
     
    50485236 
    50495237 
    5050                                 wt_pthreads_test=no 
     5238                                       _wi_pthreads_test=no 
    50515239 
    50525240fi 
     
    50635251 
    50645252 
    5065         #include <pthread.h> 
    5066         #include <errno.h> 
    5067  
    5068         void * thread(void *arg) { 
    5069                 return NULL; 
    5070        
    5071  
    5072  
    5073         int main(void) { 
    5074  
    5075         pthread_t tid; 
    5076  
    5077         if(pthread_create(&tid, 0, thread, NULL) < 0) 
    5078                 return errno; 
    5079  
    5080         return 0; 
    5081  
    5082        
     5253               #include <pthread.h> 
     5254               #include <errno.h> 
     5255 
     5256               void * thread(void *arg) { 
     5257                       return NULL; 
     5258               
     5259 
     5260 
     5261               int main(void) { 
     5262 
     5263               pthread_t tid; 
     5264 
     5265               if(pthread_create(&tid, 0, thread, NULL) < 0) 
     5266                       return errno; 
     5267 
     5268               return 0; 
     5269 
     5270               
    50835271 
    50845272_ACEOF 
     
    50955283  (exit $ac_status); }; }; then 
    50965284 
    5097                         wt_pthreads_test=yes 
     5285                               _wi_pthreads_test=yes 
    50985286 
    50995287else 
     
    51045292( exit $ac_status ) 
    51055293 
    5106                         wt_pthreads_test=no 
     5294                               _wi_pthreads_test=no 
    51075295 
    51085296fi 
     
    51105298fi 
    51115299 
    5112                 # Restore libs 
    5113                 LIBS="$OLD_LIBS" 
    5114  
    5115                 # Did we find something? 
    5116                 if test "$wt_pthreads_test" = yes ; then 
    5117                         wt_pthreads_found=yes 
    5118                         wt_pthreads_libs="-lpthread" 
     5300                        LIBS="$OLD_LIBS" 
     5301 
     5302                        if test "$_wi_pthreads_test" = yes ; then 
     5303                                _wi_pthreads_found=yes 
     5304                                _wi_pthreads_libs="" 
     5305                        fi 
    51195306                fi 
    5120         fi 
    5121  
    5122  
    5123         if test "$wt_pthreads_found" != yes ; then 
    5124                 # Save libs 
    5125                 OLD_LIBS="$LIBS" 
    5126                 LIBS="-pthread $LIBS" 
    5127  
    5128                 # Try to run it 
    5129                 if test "$cross_compiling" = yes; then 
    5130  
    5131                         cat >conftest.$ac_ext <<_ACEOF 
     5307 
     5308 
     5309                if test "$_wi_pthreads_found" != yes ; then 
     5310                        OLD_LIBS="$LIBS" 
     5311                        LIBS=" $LIBS" 
     5312 
     5313                        if test "$cross_compiling" = yes; then 
     5314 
     5315                                cat >conftest.$ac_ext <<_ACEOF 
    51325316/* confdefs.h.  */ 
    51335317_ACEOF 
     
    51365320/* end confdefs.h.  */ 
    51375321 
    5138         #include <pthread.h> 
    5139         #include <errno.h> 
    5140  
    5141         void * thread(void *arg) { 
    5142                 return NULL; 
    5143        
     5322               #include <pthread.h> 
     5323               #include <errno.h> 
     5324 
     5325               void * thread(void *arg) { 
     5326                       return NULL; 
     5327               
    51445328 
    51455329int 
     
    51475331{ 
    51485332 
    5149         pthread_t tid; 
    5150  
    5151         if(pthread_create(&tid, 0, thread, NULL) < 0) 
    5152                 return errno; 
    5153  
    5154         return 0; 
     5333               pthread_t tid; 
     5334 
     5335               if(pthread_create(&tid, 0, thread, NULL) < 0) 
     5336                       return errno; 
     5337 
     5338               return 0; 
    51555339 
    51565340  ; 
     
    51815365  (exit $ac_status); }; }; then 
    51825366 
    5183                                 wt_pthreads_test=yes 
     5367                                       _wi_pthreads_test=yes 
    51845368 
    51855369else 
     
    51885372 
    51895373 
    5190                                 wt_pthreads_test=no 
     5374                                       _wi_pthreads_test=no 
    51915375 
    51925376fi 
     
    52035387 
    52045388 
    5205         #include <pthread.h> 
    5206         #include <errno.h> 
    5207  
    5208         void * thread(void *arg) { 
    5209                 return NULL; 
    5210        
    5211  
    5212  
    5213         int main(void) { 
    5214  
    5215         pthread_t tid; 
    5216  
    5217         if(pthread_create(&tid, 0, thread, NULL) < 0) 
    5218                 return errno; 
    5219  
    5220         return 0; 
    5221  
    5222        
     5389               #include <pthread.h> 
     5390               #include <errno.h> 
     5391 
     5392               void * thread(void *arg) { 
     5393                       return NULL; 
     5394               
     5395 
     5396 
     5397               int main(void) { 
     5398 
     5399               pthread_t tid; 
     5400 
     5401               if(pthread_create(&tid, 0, thread, NULL) < 0) 
     5402                       return errno; 
     5403 
     5404               return 0; 
     5405 
     5406               
    52235407 
    52245408_ACEOF 
     
    52355419  (exit $ac_status); }; }; then 
    52365420 
    5237                         wt_pthreads_test=yes 
     5421                               _wi_pthreads_test=yes 
    52385422 
    52395423else 
     
    52445428( exit $ac_status ) 
    52455429 
    5246                         wt_pthreads_test=no 
     5430                               _wi_pthreads_test=no 
    52475431 
    52485432fi 
     
    52505434fi 
    52515435 
    5252                 # Restore libs 
    5253                 LIBS="$OLD_LIBS" 
    5254  
    5255                 # Did we find something? 
    5256                 if test "$wt_pthreads_test" = yes ; then 
    5257                         wt_pthreads_found=yes 
    5258                         wt_pthreads_libs="-pthread" 
     5436                        LIBS="$OLD_LIBS" 
     5437 
     5438                        if test "$_wi_pthreads_test" = yes ; then 
     5439                                _wi_pthreads_found=yes 
     5440                                _wi_pthreads_libs="" 
     5441                        fi 
    52595442                fi 
    5260         fi 
    5261  
    5262  
    5263         if test "$wt_pthreads_found" != yes ; then 
    5264                 # Save libs 
    5265                 OLD_LIBS="$LIBS" 
    5266                 LIBS=" $LIBS" 
    5267  
    5268                 # Try to run it 
    5269                 if test "$cross_compiling" = yes; then 
    5270  
    5271                         cat >conftest.$ac_ext <<_ACEOF 
     5443 
     5444 
     5445                if test "$_wi_pthreads_found" != yes ; then 
     5446                        OLD_LIBS="$LIBS" 
     5447                        LIBS=" $LIBS" 
     5448 
     5449                        if test "$cross_compiling" = yes; then 
     5450 
     5451                                cat >conftest.$ac_ext <<_ACEOF 
    52725452/* confdefs.h.  */ 
    52735453_ACEOF 
     
    52765456/* end confdefs.h.  */ 
    52775457 
    5278         #include <pthread.h> 
    5279         #include <errno.h> 
    5280  
    5281         void * thread(void *arg) { 
    5282                 return NULL; 
    5283        
     5458               #include <pthread.h> 
     5459               #include <errno.h> 
     5460 
     5461               void * thread(void *arg) { 
     5462                       return NULL; 
     5463               
    52845464 
    52855465int 
     
    52875467{ 
    52885468 
    5289         pthread_t tid; 
    5290  
    5291         if(pthread_create(&tid, 0, thread, NULL) < 0) 
    5292                 return errno; 
    5293  
    5294         return 0; 
     5469               pthread_t tid; 
     5470 
     5471               if(pthread_create(&tid, 0, thread, NULL) < 0) 
     5472                       return errno; 
     5473 
     5474               return 0; 
    52955475 
    52965476  ; 
     
    53215501  (exit $ac_status); }; }; then 
    53225502 
    5323                                 wt_pthreads_test=yes 
     5503                                       _wi_pthreads_test=yes 
    53245504 
    53255505else 
     
    53285508 
    53295509 
    5330                                 wt_pthreads_test=no 
     5510                                       _wi_pthreads_test=no 
    53315511 
    53325512fi 
     
    53435523 
    53445524 
    5345         #include <pthread.h> 
    5346         #include <errno.h> 
    5347  
    5348         void * thread(void *arg) { 
    5349                 return NULL; 
    5350        
    5351  
    5352  
    5353         int main(void) { 
    5354  
    5355         pthread_t tid; 
    5356  
    5357         if(pthread_create(&tid, 0, thread, NULL) < 0) 
    5358                 return errno; 
    5359  
    5360         return 0; 
    5361  
    5362        
     5525               #include <pthread.h> 
     5526               #include <errno.h> 
     5527 
     5528               void * thread(void *arg) { 
     5529                       return NULL; 
     5530               
     5531 
     5532 
     5533               int main(void) { 
     5534 
     5535               pthread_t tid; 
     5536 
     5537               if(pthread_create(&tid, 0, thread, NULL) < 0) 
     5538                       return errno; 
     5539 
     5540               return 0; 
     5541 
     5542               
    53635543 
    53645544_ACEOF 
     
    53755555  (exit $ac_status); }; }; then 
    53765556 
    5377                         wt_pthreads_test=yes 
     5557                               _wi_pthreads_test=yes 
    53785558 
    53795559else 
     
    53845564( exit $ac_status ) 
    53855565 
    5386                         wt_pthreads_test=no 
     5566                               _wi_pthreads_test=no 
    53875567 
    53885568fi 
     
    53905570fi 
    53915571 
    5392                 # Restore libs 
    5393                 LIBS="$OLD_LIBS" 
    5394  
    5395                 # Did we find something? 
    5396                 if test "$wt_pthreads_test" = yes ; then 
    5397                         wt_pthreads_found=yes 
    5398                         wt_pthreads_libs="" 
     5572                        LIBS="$OLD_LIBS" 
     5573 
     5574                        if test "$_wi_pthreads_test" = yes ; then 
     5575                                _wi_pthreads_found=yes 
     5576                                _wi_pthreads_libs="" 
     5577                        fi 
    53995578                fi 
    5400         fi 
    5401  
    5402  
    5403         # Did we find something? 
    5404         if test "$wt_pthreads_found" = yes ; then 
    5405                 echo "$as_me:$LINENO: result: yes" >&5 
     5579 
     5580 
     5581                if test "$_wi_pthreads_found" = yes ; then 
     5582                        echo "$as_me:$LINENO: result: yes" >&5 
    54065583echo "${ECHO_T}yes" >&6 
    5407                 LIBS="$wt_pthreads_libs $LIBS" 
    5408         else 
    5409                 echo "$as_me:$LINENO: result: no" >&5 
     5584                       LIBS="$_wi_pthreads_libs $LIBS" 
     5585               else 
     5586                       echo "$as_me:$LINENO: result: no" >&5 
    54105587echo "${ECHO_T}no" >&6 
     5588                        { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 
     5589echo "$as_me: error: could not locate pthreads" >&2;} 
     5590   { (exit 1); exit 1; }; } 
     5591                fi 
     5592 
     5593else 
     5594 
    54115595                { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 
    54125596echo "$as_me: error: could not locate pthreads" >&2;} 
    54135597   { (exit 1); exit 1; }; } 
    5414         fi 
    5415  
    5416 else 
    5417  
    5418         { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 
    5419 echo "$as_me: error: could not locate pthreads" >&2;} 
    5420    { (exit 1); exit 1; }; } 
    54215598 
    54225599fi 
    54235600 
    54245601done 
     5602 
    54255603 
    54265604 
  • trackerd/trunk/configure.in

    r4490 r4520  
    55AC_CONFIG_HEADER([config.h]) 
    66 
     7# Include shared macros 
     8m4_include([libwired/config.m4]) 
     9 
    710# Get host 
    811AC_CANONICAL_HOST 
     
    1518# These are used in the Makefile 
    1619AC_SUBST([WT_VERSION], ["AC_PACKAGE_VERSION"]) 
    17  
    18 # These are used in configure.in 
    19 AC_DEFUN([WT_MSG_LIB_ERROR], [ 
    20         AC_MSG_ERROR([could not locate $1 
    21          
    22 If you installed $1 into a non-standard directory, please run: 
    23  
    24     env CPPFLAGS="-I/path/to/include" LDFLAGS="-L/path/to/lib" ./configure]) 
    25 ]) 
    26  
    27 AC_DEFUN([WT_MSG_LIBWIRED_ERROR], [ 
    28     AC_MSG_ERROR([could not locate libwired 
    29  
    30 You need to download a version of libwired and place it in the same directory as this configure script]) 
    31 ]) 
    3220 
    3321 
     
    9785AC_ARG_ENABLE([warnings], AC_HELP_STRING([--enable-warnings], [enable warnings])) 
    9886 
    99 AC_DEFUN([WT_WARNING_TRY], [ 
    100         OLD_CFLAGS="$CFLAGS" 
    101         CFLAGS="$CFLAGS $1" 
    102  
    103         AC_COMPILE_IFELSE([ 
    104                 int main(void) { 
    105                         return 0; 
    106                 } 
    107         ], [ 
    108                 WARNFLAGS="$WARNFLAGS $1" 
    109         ], [ 
    110                 CFLAGS="$OLD_CFLAGS" 
    111         ]) 
    112 ]) 
    113  
    11487if test -n "$enable_warnings"; then 
    115         WT_WARNING_TRY([-W]) 
    116         WT_WARNING_TRY([-Wall]) 
    117         WT_WARNING_TRY([-Wno-unknown-pragmas]) 
    118         WT_WARNING_TRY([-Wno-unused-parameter]) 
    119         WT_WARNING_TRY([-Wsign-compare]) 
    120         WT_WARNING_TRY([-Wstrict-prototypes]) 
    121         WT_WARNING_TRY([-Wmissing-prototypes]) 
    122         WT_WARNING_TRY([-Wmissing-declarations]) 
    123         WT_WARNING_TRY([-Wredundant-decls]) 
     88        WI_INCLUDE_WARNING_FLAG([-W]) 
     89        WI_INCLUDE_WARNING_FLAG([-Wall]) 
     90        WI_INCLUDE_WARNING_FLAG([-Wno-unknown-pragmas]) 
     91        WI_INCLUDE_WARNING_FLAG([-Wno-unused-parameter]) 
     92        WI_INCLUDE_WARNING_FLAG([-Wsign-compare]) 
     93        WI_INCLUDE_WARNING_FLAG([-Wstrict-prototypes]) 
     94        WI_INCLUDE_WARNING_FLAG([-Wmissing-prototypes]) 
     95        WI_INCLUDE_WARNING_FLAG([-Wmissing-declarations]) 
     96        WI_INCLUDE_WARNING_FLAG([-Wredundant-decls]) 
    12497 
    12598        AC_MSG_RESULT([$WARNFLAGS]) 
     
    188161# Checks for additional paths 
    189162 
    190 # Check if we need /usr/local/{include,lib}/ 
    191 if test -d /usr/local/include; then 
    192         CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
    193 fi 
    194  
    195 if test -d /usr/local/lib; then 
    196         LDFLAGS="$LDFLAGS -L/usr/local/lib" 
    197 fi 
    198  
    199  
    200 # Check if we need /usr/local/ssl/{include,lib}/ 
    201 if test -d /usr/local/ssl/include; then 
    202         CPPFLAGS="$CPPFLAGS -I/usr/local/ssl/include" 
    203 fi 
    204  
    205 if test -d /usr/local/ssl/lib; then 
    206         LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" 
    207 fi 
    208  
    209  
    210 # Check if we need /usr/kerberos/include 
    211 if test -d /usr/kerberos/include; then 
    212         CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 
    213 fi 
     163WI_INCLUDE_EXTRA_INCLUDE_PATHS 
     164WI_INCLUDE_EXTRA_LIBRARY_PATHS 
    214165 
    215166 
     
    217168# Checks for libraries 
    218169 
    219 # Check that we have a libwired in this directory 
    220 if ! test -f "$srcdir/libwired/configure"; then 
    221         WT_MSG_LIBWIRED_ERROR 
    222 fi 
    223  
    224  
    225 # Check if we need the math library 
    226 AC_CHECK_FUNC([pow], [], [ 
    227         AC_CHECK_LIB([m], [sqrt], [ 
    228                 LIBS="$LIBS -lm" 
    229         ]) 
    230 ]) 
    231  
    232  
    233 # Check if we need the socket library 
    234 AC_CHECK_FUNC(setsockopt, [], [ 
    235         AC_CHECK_LIB([socket], [setsockopt], [ 
    236                 LIBS="$LIBS -lsocket" 
    237         ]) 
    238 ]) 
    239  
    240  
    241 # Check if we need the network services library 
    242 AC_CHECK_FUNC([gethostent], [], [ 
    243         AC_CHECK_LIB([nsl], [gethostent], [ 
    244                 LIBS="$LIBS -lnsl" 
    245         ]) 
    246 ]) 
    247  
    248  
    249 # Check for the OpenSSL crypto library 
    250 AC_CHECK_HEADERS([openssl/sha.h], [ 
    251         AC_CHECK_LIB([crypto], [MD5_Init], [ 
    252                 LIBS="$LIBS -lcrypto" 
    253         ], [ 
    254                 WT_MSG_LIB_ERROR([OpenSSL]) 
    255         ]) 
    256 ], [ 
    257         WT_MSG_LIB_ERROR([OpenSSL]) 
    258 ]) 
    259  
    260  
    261 # Check for the OpenSSL ssl library 
    262 AC_CHECK_HEADERS([openssl/ssl.h], [ 
    263         AC_CHECK_LIB([ssl], [SSL_library_init], [ 
    264                 LIBS="$LIBS -lssl" 
    265         ], [ 
    266                 WT_MSG_LIB_ERROR([OpenSSL]) 
    267         ]) 
    268 ], [ 
    269         WT_MSG_LIB_ERROR([OpenSSL]) 
    270 ]) 
    271  
    272  
    273 # Check for CoreServices (Mac OS X) 
    274 AC_CHECK_HEADERS([CoreServices/CoreServices.h], [ 
    275         LIBS="$LIBS -framework CoreServices -framework Carbon" 
    276 ]) 
    277  
    278  
    279 #########################