Check for pthread with -mt (for Solaris 2.x).

Still requires user to workaround Solaris pthread_create in -lc issue.
This commit is contained in:
Kurt Zeilenga 1999-02-21 00:46:57 +00:00
parent aa17fdd0bd
commit 9e2fc1ed06
2 changed files with 381 additions and 321 deletions

681
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -493,6 +493,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
dnl pthread_create() with -pthread (FreeBSD/Digital Unix)
dnl pthread_create() with -pthreads (?)
dnl pthread_create() with -thread (?)
dnl pthread_create() with -mt (Solaris)
dnl
dnl Check pthread (final) libraries
dnl pthread_mutex_unlock() in -lpthread -lmach -lexc -lc_r (OSF/1)
@ -595,6 +596,26 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
fi
fi
if test $ol_link_threads = no ; then
dnl try -mt
AC_CACHE_CHECK([for pthread_create with -mt],
[ol_cv_thread_flag], [
dnl save the flags
save_LIBS="$LIBS"
LIBS="-mt $LIBS"
AC_TRY_LINK([char pthread_create();],
[pthread_create();],
[ol_cv_thread_flag=yes], [ol_cv_thread_flag=no])
dnl restore the LIBS
LIBS="$save_LIBS"
])
if test $ol_cv_thread_flag = yes ; then
LTHREAD_LIBS="$LTHREAD_LIBS -mt"
ol_link_threads=posix
fi
fi
if test $ol_link_threads = no ; then
dnl try DEC Threads -lpthread -lmach -lexc -lc_r
save_LIBS="$LIBS"