* 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:
Guilhem Lavaux 1998-06-20 10:25:12 +00:00
parent 9fd239ad61
commit bdc6fff9ea
4 changed files with 379 additions and 290 deletions

603
install/gtk/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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)

View File

@ -114,11 +114,12 @@ LINK_LIBS= \
$(WX_LIBS) \
$(GUI_TK_LIBS) \
$(X_EXTRA_LIBS) \
$(X_PRE_LIBS)
$(X_PRE_LIBS) \
$(THREADS_LINK)
# $(X_LIBS) -lX11 -lXext -lm gtk-config does this for me
# Don't include $(OPENGL_LIBS) or $(THREADS_LINK) in LINK_LIBS; they
# Don't include $(OPENGL_LIBS) in LINK_LIBS; they
# can be conveniently added to BIN_LINK in Makefile.in.
#### End of system configuration section. ####

View File

@ -114,11 +114,12 @@ LINK_LIBS= \
$(WX_LIBS) \
$(GUI_TK_LIBS) \
$(X_EXTRA_LIBS) \
$(X_PRE_LIBS)
$(X_PRE_LIBS) \
$(THREADS_LINK)
# $(X_LIBS) -lX11 -lXext -lm gtk-config does this for me
# Don't include $(OPENGL_LIBS) or $(THREADS_LINK) in LINK_LIBS; they
# Don't include $(OPENGL_LIBS) in LINK_LIBS; they
# can be conveniently added to BIN_LINK in Makefile.in.
#### End of system configuration section. ####