* Added $(THREADS_LINK) to $(LINK_LIBS) so all programs can be linked.
* Updated the thread detected (pthread-0.7, pthread, pthreads) * Added --without-threads to disable threads git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
609
install/gtk/configure
vendored
609
install/gtk/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -500,21 +500,41 @@ dnl ##########################
|
||||
|
||||
|
||||
dnl ##### Threads #####
|
||||
UNIX_THREAD="gtk/threadno.cpp"
|
||||
AC_CHECK_LIB(pthread, pthread_create, [
|
||||
UNIX_THREAD="gtk/threadpsx.cpp"
|
||||
THREADS_LINK="-lpthread"
|
||||
AC_DEFINE(USE_THREADS)
|
||||
])
|
||||
AC_CHECK_LIB(pthreads, pthread_create, [
|
||||
UNIX_THREAD="gtk/threadpsx.cpp"
|
||||
THREADS_LINK="-lpthreads"
|
||||
AC_DEFINE(USE_THREADS)
|
||||
])
|
||||
AC_CHECK_HEADER(sys/prctl.h, [
|
||||
UNIX_THREAD="gtk/threadsgi.cpp"
|
||||
AC_DEFINE(USE_THREADS)
|
||||
])
|
||||
USE_THREADS=1
|
||||
THREADS_LINK=""
|
||||
UNIX_THREAD=""
|
||||
|
||||
AC_ARG_WITH(threads,
|
||||
[ --without-threads Force disabling threads ],
|
||||
[USE_THREADS="$withval"])
|
||||
|
||||
if test "$USE_THREADS" = "1"; then
|
||||
UNIX_THREAD="gtk/threadno.cpp"
|
||||
|
||||
dnl For glibc 2 users who have the old libc 5 too
|
||||
|
||||
AC_CHECK_LIB(pthread-0.7, pthread_create, [
|
||||
UNIX_THREAD="gtk/threadpsx.cpp"
|
||||
THREADS_LINK="-lpthread-0.7"
|
||||
AC_DEFINE(USE_THREADS)
|
||||
],[
|
||||
AC_CHECK_LIB(pthread, pthread_create, [
|
||||
UNIX_THREAD="gtk/threadpsx.cpp"
|
||||
THREADS_LINK="-lpthread"
|
||||
AC_DEFINE(USE_THREADS)
|
||||
])
|
||||
])
|
||||
AC_CHECK_LIB(pthreads, pthread_create, [
|
||||
UNIX_THREAD="gtk/threadpsx.cpp"
|
||||
THREADS_LINK="-lpthreads"
|
||||
AC_DEFINE(USE_THREADS)
|
||||
])
|
||||
AC_CHECK_HEADER(sys/prctl.h, [
|
||||
UNIX_THREAD="gtk/threadsgi.cpp"
|
||||
AC_DEFINE(USE_THREADS)
|
||||
])
|
||||
fi
|
||||
|
||||
AC_SUBST(UNIX_THREAD)
|
||||
AC_SUBST(THREADS_LINK)
|
||||
dnl defines UNIX_THREAD it contains the source file to use for threads. (GL)
|
||||
|
Reference in New Issue
Block a user