Deleted Added
full compact
openldap-thread-check.m4 (285830) openldap-thread-check.m4 (289999)
1dnl OpenLDAP Autoconf thread check
2dnl
3dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
4dnl
5dnl Copyright 1998-2010 The OpenLDAP Foundation.
6dnl All rights reserved.
7dnl
8dnl Redistribution and use in source and binary forms, with or without
9dnl modification, are permitted only as authorized by the OpenLDAP
10dnl Public License.
11dnl
12dnl A copy of this license is available in the file LICENSE-OPENLDAP in
13dnl this directory of the distribution or, alternatively, at
14dnl <http://www.OpenLDAP.org/license.html>.
15dnl
16dnl --------------------------------------------------------------------
17
1dnl OpenLDAP Autoconf thread check
2dnl
3dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
4dnl
5dnl Copyright 1998-2010 The OpenLDAP Foundation.
6dnl All rights reserved.
7dnl
8dnl Redistribution and use in source and binary forms, with or without
9dnl modification, are permitted only as authorized by the OpenLDAP
10dnl Public License.
11dnl
12dnl A copy of this license is available in the file LICENSE-OPENLDAP in
13dnl this directory of the distribution or, alternatively, at
14dnl <http://www.OpenLDAP.org/license.html>.
15dnl
16dnl --------------------------------------------------------------------
17
18dnl This file is a fragment of OpenLDAP's build/openldap.m4 and some
19dnl fragments of OpenLDAP's configure.ac .
20
18# OL_THREAD_CHECK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
19
20AC_DEFUN([OL_THREAD_CHECK], [
21AC_REQUIRE([AC_CANONICAL_HOST])
22AC_LANG_SAVE
23AC_LANG([C])
24OL_ARG_WITH(threads,[ --with-threads with threads],
25 auto, [auto nt posix mach pth lwp yes no manual] )

--- 171 unchanged lines hidden (view full) ---

197 [ol_cv_pthread_lpthreads_lmach_lexc_lc_r])
198 OL_PTHREAD_TRY([-lpthreads -lmach -lexc],
199 [ol_cv_pthread_lpthreads_lmach_lexc])
200 OL_PTHREAD_TRY([-lpthreads -lexc],
201 [ol_cv_pthread_lpthreads_lexc])
202
203 OL_PTHREAD_TRY([-lpthreads],[ol_cv_pthread_lib_lpthreads])
204
21# OL_THREAD_CHECK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
22
23AC_DEFUN([OL_THREAD_CHECK], [
24AC_REQUIRE([AC_CANONICAL_HOST])
25AC_LANG_SAVE
26AC_LANG([C])
27OL_ARG_WITH(threads,[ --with-threads with threads],
28 auto, [auto nt posix mach pth lwp yes no manual] )

--- 171 unchanged lines hidden (view full) ---

200 [ol_cv_pthread_lpthreads_lmach_lexc_lc_r])
201 OL_PTHREAD_TRY([-lpthreads -lmach -lexc],
202 [ol_cv_pthread_lpthreads_lmach_lexc])
203 OL_PTHREAD_TRY([-lpthreads -lexc],
204 [ol_cv_pthread_lpthreads_lexc])
205
206 OL_PTHREAD_TRY([-lpthreads],[ol_cv_pthread_lib_lpthreads])
207
208AC_MSG_NOTICE([ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>])
209
205 if test $ol_link_threads != no ; then
206 LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
207
208 dnl save flags
209 save_CPPFLAGS="$CPPFLAGS"
210 save_LIBS="$LIBS"
211 LIBS="$LTHREAD_LIBS $LIBS"
212

--- 462 unchanged lines hidden (view full) ---

675 $2
676 ;;
677 *)
678 ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
679 ;;
680esac
681
682AC_LANG_RESTORE
210 if test $ol_link_threads != no ; then
211 LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
212
213 dnl save flags
214 save_CPPFLAGS="$CPPFLAGS"
215 save_LIBS="$LIBS"
216 LIBS="$LTHREAD_LIBS $LIBS"
217

--- 462 unchanged lines hidden (view full) ---

680 $2
681 ;;
682 *)
683 ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
684 ;;
685esac
686
687AC_LANG_RESTORE
688
689AC_SUBST(BUILD_THREAD)
690AC_SUBST(LTHREAD_LIBS)
691
683])
692])