[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Configure error(POSIX thread)



I tried this exactly as written, and it had no effect. I still get the 
POSIX error.

Bill Tangren



> --- build/openldap.m4
> +++ build/openldap.m4	2001/05/22 08:06:03
> @@ -646,7 +646,7 @@
>  	pthread_kill_other_threads_np();
>  #endif
>  
> -	exit( status );
> +	exit(0);
>  ])
>  
>  AC_DEFUN([OL_PTHREAD_TEST_PROGRAM],
> @@ -672,6 +672,29 @@
>  			[$2=yes], [$2=no],
>  			[AC_TRY_LINK(OL_PTHREAD_TEST_INCLUDES,OL_PTHREAD_TEST_FUNCTION,
>  				[$2=yes], [$2=no])])
> +
> +		# restore the LIBS
> +		LIBS="$ol_LIBS"
> +	])
> +
> +	if test $$2 = yes ; then
> +		ol_link_pthreads="$1"
> +		ol_link_threads=posix
> +	fi
> +fi
> +])
> +dnl
> +dnl --------------------------------------------------------------------
> +AC_DEFUN([OL_PTHREAD_TRY_LINK], [# Pthread try link: $1 ($2)
> +if test "$ol_link_threads" = no ; then
> +	# try $1
> +	AC_CACHE_CHECK([for pthread link with $1], [$2], [
> +		# save the flags
> +		ol_LIBS="$LIBS"
> +		LIBS="$1 $LIBS"
> +
> +			AC_TRY_LINK(OL_PTHREAD_TEST_INCLUDES,OL_PTHREAD_TEST_FUNCTION,
> +				[$2=yes], [$2=no])
>  
>  		# restore the LIBS
>  		LIBS="$ol_LIBS"
> --- configure.in
> +++ configure.in	2001/05/22 08:06:03
> @@ -1152,7 +1152,7 @@
>  		OL_PTHREAD_TRY([-lpthread -Wl,-woff,85],
>  			[ol_cv_pthread_lib_lpthread_woff])
>  
> -		OL_PTHREAD_TRY([-lpthread],	[ol_cv_pthread_lpthread])
> +		OL_PTHREAD_TRY_LINK([-lpthread],	[ol_cv_pthread_lpthread])
>  		OL_PTHREAD_TRY([-lc_r],		[ol_cv_pthread_lc_r])
>  
>  		OL_PTHREAD_TRY([-threads],	[ol_cv_pthread_threads])
>