Changeset 4520
- Timestamp:
- 02/07/07 23:06:50 (2 years ago)
- Files:
-
- trackerd/trunk/configure (modified) (47 diffs)
- trackerd/trunk/configure.in (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trackerd/trunk/configure
r4490 r4520 1327 1327 1328 1328 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 1329 1380 # Get host 1330 1381 ac_aux_dir= … … 1427 1478 # These are used in the Makefile 1428 1479 WT_VERSION="1.0" 1429 1430 1431 # These are used in configure.in1432 1433 1434 1480 1435 1481 … … 2568 2614 fi; 2569 2615 2570 2571 2572 2616 if test -n "$enable_warnings"; then 2573 2617 … … 3088 3132 # Checks for additional paths 3089 3133 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 3114 3156 3115 3157 … … 3117 3159 # Checks for libraries 3118 3160 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 3123 3164 3124 3165 You need to download a version of libwired and place it in the same directory as this configure script" >&5 … … 3127 3168 You need to download a version of libwired and place it in the same directory as this configure script" >&2;} 3128 3169 { (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 3170 fi 3171 3172 3173 echo "$as_me:$LINENO: checking for pow" >&5 3135 3174 echo $ECHO_N "checking for pow... $ECHO_C" >&6 3136 3175 if test "${ac_cv_func_pow+set}" = set; then … … 3226 3265 else 3227 3266 3228 echo "$as_me:$LINENO: checking for sqrt in -lm" >&53267 echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 3229 3268 echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 3230 3269 if test "${ac_cv_lib_m_sqrt+set}" = set; then … … 3292 3331 if test $ac_cv_lib_m_sqrt = yes; then 3293 3332 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 3335 fi 3336 3337 3338 fi 3339 3340 3341 3342 echo "$as_me:$LINENO: checking for setsockopt" >&5 3305 3343 echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 3306 3344 if test "${ac_cv_func_setsockopt+set}" = set; then … … 3396 3434 else 3397 3435 3398 echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&53436 echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 3399 3437 echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 3400 3438 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then … … 3462 3500 if test $ac_cv_lib_socket_setsockopt = yes; then 3463 3501 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 3504 fi 3505 3506 3507 fi 3508 3509 3510 3511 echo "$as_me:$LINENO: checking for gethostent" >&5 3475 3512 echo $ECHO_N "checking for gethostent... $ECHO_C" >&6 3476 3513 if test "${ac_cv_func_gethostent+set}" = set; then … … 3566 3603 else 3567 3604 3568 echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&53605 echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 3569 3606 echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6 3570 3607 if test "${ac_cv_lib_nsl_gethostent+set}" = set; then … … 3632 3669 if test $ac_cv_lib_nsl_gethostent = yes; then 3633 3670 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 3673 fi 3674 3675 3676 fi 3677 3678 3679 3680 echo "$as_me:$LINENO: checking for inet_aton" >&5 3681 echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 3682 if test "${ac_cv_func_inet_aton+set}" = set; then 3683 echo $ECHO_N "(cached) $ECHO_C" >&6 3684 else 3685 cat >conftest.$ac_ext <<_ACEOF 3686 /* confdefs.h. */ 3687 _ACEOF 3688 cat confdefs.h >>conftest.$ac_ext 3689 cat >>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 3710 extern "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. */ 3715 char 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) 3720 choke me 3721 #else 3722 char (*f) () = inet_aton; 3723 #endif 3724 #ifdef __cplusplus 3725 } 3726 #endif 3727 3728 int 3729 main () 3730 { 3731 return f != inet_aton; 3732 ; 3733 return 0; 3734 } 3735 _ACEOF 3736 rm -f conftest.$ac_objext conftest$ac_exeext 3737 if { (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 3759 else 3760 echo "$as_me: failed program was:" >&5 3761 sed 's/^/| /' conftest.$ac_ext >&5 3762 3763 ac_cv_func_inet_aton=no 3764 fi 3765 rm -f conftest.err conftest.$ac_objext \ 3766 conftest$ac_exeext conftest.$ac_ext 3767 fi 3768 echo "$as_me:$LINENO: result: $ac_cv_func_inet_aton" >&5 3769 echo "${ECHO_T}$ac_cv_func_inet_aton" >&6 3770 if test $ac_cv_func_inet_aton = yes; then 3771 : 3772 else 3773 3774 echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 3775 echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6 3776 if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then 3777 echo $ECHO_N "(cached) $ECHO_C" >&6 3778 else 3779 ac_check_lib_save_LIBS=$LIBS 3780 LIBS="-lresolv $LIBS" 3781 cat >conftest.$ac_ext <<_ACEOF 3782 /* confdefs.h. */ 3783 _ACEOF 3784 cat confdefs.h >>conftest.$ac_ext 3785 cat >>conftest.$ac_ext <<_ACEOF 3786 /* end confdefs.h. */ 3787 3788 /* Override any gcc2 internal prototype to avoid an error. */ 3789 #ifdef __cplusplus 3790 extern "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. */ 3794 char inet_aton (); 3795 int 3796 main () 3797 { 3798 inet_aton (); 3799 ; 3800 return 0; 3801 } 3802 _ACEOF 3803 rm -f conftest.$ac_objext conftest$ac_exeext 3804 if { (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 3826 else 3827 echo "$as_me: failed program was:" >&5 3828 sed 's/^/| /' conftest.$ac_ext >&5 3829 3830 ac_cv_lib_resolv_inet_aton=no 3831 fi 3832 rm -f conftest.err conftest.$ac_objext \ 3833 conftest$ac_exeext conftest.$ac_ext 3834 LIBS=$ac_check_lib_save_LIBS 3835 fi 3836 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 3837 echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6 3838 if test $ac_cv_lib_resolv_inet_aton = yes; then 3839 3840 LIBS="$LIBS -lresolv" 3841 3842 fi 3843 3844 3845 fi 3846 3847 3644 3848 ac_ext=c 3645 3849 ac_cpp='$CPP $CPPFLAGS' … … 4128 4332 4129 4333 done 4334 4130 4335 4131 4336 … … 4276 4481 _ACEOF 4277 4482 4278 echo "$as_me:$LINENO: checking for MD5_Init in -lcrypto" >&54483 echo "$as_me:$LINENO: checking for MD5_Init in -lcrypto" >&5 4279 4484 echo $ECHO_N "checking for MD5_Init in -lcrypto... $ECHO_C" >&6 4280 4485 if test "${ac_cv_lib_crypto_MD5_Init+set}" = set; then … … 4342 4547 if test $ac_cv_lib_crypto_MD5_Init = yes; then 4343 4548 4344 LIBS="$LIBS -lcrypto"4549 LIBS="$LIBS -lcrypto" 4345 4550 4346 4551 else … … 4385 4590 4386 4591 4387 # Check for the OpenSSL ssl library4388 4592 4389 4593 for ac_header in openssl/ssl.h … … 4532 4736 _ACEOF 4533 4737 4534 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&54738 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 4535 4739 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6 4536 4740 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then … … 4598 4802 if test $ac_cv_lib_ssl_SSL_library_init = yes; then 4599 4803 4600 LIBS="$LIBS -lssl"4804 LIBS="$LIBS -lssl" 4601 4805 4602 4806 else … … 4641 4845 4642 4846 4643 # Check for CoreServices (Mac OS X)4644 4847 4645 4848 for ac_header in CoreServices/CoreServices.h … … 4788 4991 _ACEOF 4789 4992 4790 LIBS="$LIBS -framework CoreServices -framework Carbon"4993 LIBS="$LIBS -framework CoreServices -framework Carbon" 4791 4994 4792 4995 fi … … 4796 4999 4797 5000 4798 ####################################################################### 4799 # Check for host-specific semantics 4800 4801 case $host in 4802 *-solaris*) 5001 case $host in 5002 *-solaris*) 4803 5003 4804 5004 cat >>confdefs.h <<\_ACEOF … … 4806 5006 _ACEOF 4807 5007 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 4832 5023 4833 5024 for ac_header in pthread.h … … 4976 5167 _ACEOF 4977 5168 4978 echo "$as_me:$LINENO: checking for pthreads" >&55169 echo "$as_me:$LINENO: checking for pthreads" >&5 4979 5170 echo $ECHO_N "checking for pthreads... $ECHO_C" >&6 4980 5171 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 4992 5180 /* confdefs.h. */ 4993 5181 _ACEOF … … 4996 5184 /* end confdefs.h. */ 4997 5185 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 } 5004 5192 5005 5193 int … … 5007 5195 { 5008 5196 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; 5015 5203 5016 5204 ; … … 5041 5229 (exit $ac_status); }; }; then 5042 5230 5043 wt_pthreads_test=yes5231 _wi_pthreads_test=yes 5044 5232 5045 5233 else … … 5048 5236 5049 5237 5050 wt_pthreads_test=no5238 _wi_pthreads_test=no 5051 5239 5052 5240 fi … … 5063 5251 5064 5252 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 } 5083 5271 5084 5272 _ACEOF … … 5095 5283 (exit $ac_status); }; }; then 5096 5284 5097 wt_pthreads_test=yes5285 _wi_pthreads_test=yes 5098 5286 5099 5287 else … … 5104 5292 ( exit $ac_status ) 5105 5293 5106 wt_pthreads_test=no5294 _wi_pthreads_test=no 5107 5295 5108 5296 fi … … 5110 5298 fi 5111 5299 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 5119 5306 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 5132 5316 /* confdefs.h. */ 5133 5317 _ACEOF … … 5136 5320 /* end confdefs.h. */ 5137 5321 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 } 5144 5328 5145 5329 int … … 5147 5331 { 5148 5332 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; 5155 5339 5156 5340 ; … … 5181 5365 (exit $ac_status); }; }; then 5182 5366 5183 wt_pthreads_test=yes5367 _wi_pthreads_test=yes 5184 5368 5185 5369 else … … 5188 5372 5189 5373 5190 wt_pthreads_test=no5374 _wi_pthreads_test=no 5191 5375 5192 5376 fi … … 5203 5387 5204 5388 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 } 5223 5407 5224 5408 _ACEOF … … 5235 5419 (exit $ac_status); }; }; then 5236 5420 5237 wt_pthreads_test=yes5421 _wi_pthreads_test=yes 5238 5422 5239 5423 else … … 5244 5428 ( exit $ac_status ) 5245 5429 5246 wt_pthreads_test=no5430 _wi_pthreads_test=no 5247 5431 5248 5432 fi … … 5250 5434 fi 5251 5435 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 5259 5442 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 5272 5452 /* confdefs.h. */ 5273 5453 _ACEOF … … 5276 5456 /* end confdefs.h. */ 5277 5457 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 } 5284 5464 5285 5465 int … … 5287 5467 { 5288 5468 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; 5295 5475 5296 5476 ; … … 5321 5501 (exit $ac_status); }; }; then 5322 5502 5323 wt_pthreads_test=yes5503 _wi_pthreads_test=yes 5324 5504 5325 5505 else … … 5328 5508 5329 5509 5330 wt_pthreads_test=no5510 _wi_pthreads_test=no 5331 5511 5332 5512 fi … … 5343 5523 5344 5524 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 } 5363 5543 5364 5544 _ACEOF … … 5375 5555 (exit $ac_status); }; }; then 5376 5556 5377 wt_pthreads_test=yes5557 _wi_pthreads_test=yes 5378 5558 5379 5559 else … … 5384 5564 ( exit $ac_status ) 5385 5565 5386 wt_pthreads_test=no5566 _wi_pthreads_test=no 5387 5567 5388 5568 fi … … 5390 5570 fi 5391 5571 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 5399 5578 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 5406 5583 echo "${ECHO_T}yes" >&6 5407 LIBS="$wt_pthreads_libs $LIBS"5408 else5409 echo "$as_me:$LINENO: result: no" >&55584 LIBS="$_wi_pthreads_libs $LIBS" 5585 else 5586 echo "$as_me:$LINENO: result: no" >&5 5410 5587 echo "${ECHO_T}no" >&6 5588 { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 5589 echo "$as_me: error: could not locate pthreads" >&2;} 5590 { (exit 1); exit 1; }; } 5591 fi 5592 5593 else 5594 5411 5595 { { echo "$as_me:$LINENO: error: could not locate pthreads" >&5 5412 5596 echo "$as_me: error: could not locate pthreads" >&2;} 5413 5597 { (exit 1); exit 1; }; } 5414 fi5415 5416 else5417 5418 { { echo "$as_me:$LINENO: error: could not locate pthreads" >&55419 echo "$as_me: error: could not locate pthreads" >&2;}5420 { (exit 1); exit 1; }; }5421 5598 5422 5599 fi 5423 5600 5424 5601 done 5602 5425 5603 5426 5604 trackerd/trunk/configure.in
r4490 r4520 5 5 AC_CONFIG_HEADER([config.h]) 6 6 7 # Include shared macros 8 m4_include([libwired/config.m4]) 9 7 10 # Get host 8 11 AC_CANONICAL_HOST … … 15 18 # These are used in the Makefile 16 19 AC_SUBST([WT_VERSION], ["AC_PACKAGE_VERSION"]) 17 18 # These are used in configure.in19 AC_DEFUN([WT_MSG_LIB_ERROR], [20 AC_MSG_ERROR([could not locate $121 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 libwired29 30 You need to download a version of libwired and place it in the same directory as this configure script])31 ])32 20 33 21 … … 97 85 AC_ARG_ENABLE([warnings], AC_HELP_STRING([--enable-warnings], [enable warnings])) 98 86 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 114 87 if test -n "$enable_warnings"; then 115 W T_WARNING_TRY([-W])116 W T_WARNING_TRY([-Wall])117 W T_WARNING_TRY([-Wno-unknown-pragmas])118 W T_WARNING_TRY([-Wno-unused-parameter])119 W T_WARNING_TRY([-Wsign-compare])120 W T_WARNING_TRY([-Wstrict-prototypes])121 W T_WARNING_TRY([-Wmissing-prototypes])122 W T_WARNING_TRY([-Wmissing-declarations])123 W T_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]) 124 97 125 98 AC_MSG_RESULT([$WARNFLAGS]) … … 188 161 # Checks for additional paths 189 162 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 163 WI_INCLUDE_EXTRA_INCLUDE_PATHS 164 WI_INCLUDE_EXTRA_LIBRARY_PATHS 214 165 215 166 … … 217 168 # Checks for libraries 218 169 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 #########################
