* 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:
585
install/gtk/configure
vendored
585
install/gtk/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -500,12 +500,30 @@ dnl ##########################
|
|||||||
|
|
||||||
|
|
||||||
dnl ##### Threads #####
|
dnl ##### 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"
|
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, [
|
AC_CHECK_LIB(pthread, pthread_create, [
|
||||||
UNIX_THREAD="gtk/threadpsx.cpp"
|
UNIX_THREAD="gtk/threadpsx.cpp"
|
||||||
THREADS_LINK="-lpthread"
|
THREADS_LINK="-lpthread"
|
||||||
AC_DEFINE(USE_THREADS)
|
AC_DEFINE(USE_THREADS)
|
||||||
])
|
])
|
||||||
|
])
|
||||||
AC_CHECK_LIB(pthreads, pthread_create, [
|
AC_CHECK_LIB(pthreads, pthread_create, [
|
||||||
UNIX_THREAD="gtk/threadpsx.cpp"
|
UNIX_THREAD="gtk/threadpsx.cpp"
|
||||||
THREADS_LINK="-lpthreads"
|
THREADS_LINK="-lpthreads"
|
||||||
@@ -515,6 +533,8 @@ AC_CHECK_HEADER(sys/prctl.h, [
|
|||||||
UNIX_THREAD="gtk/threadsgi.cpp"
|
UNIX_THREAD="gtk/threadsgi.cpp"
|
||||||
AC_DEFINE(USE_THREADS)
|
AC_DEFINE(USE_THREADS)
|
||||||
])
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_SUBST(UNIX_THREAD)
|
AC_SUBST(UNIX_THREAD)
|
||||||
AC_SUBST(THREADS_LINK)
|
AC_SUBST(THREADS_LINK)
|
||||||
dnl defines UNIX_THREAD it contains the source file to use for threads. (GL)
|
dnl defines UNIX_THREAD it contains the source file to use for threads. (GL)
|
||||||
|
@@ -114,11 +114,12 @@ LINK_LIBS= \
|
|||||||
$(WX_LIBS) \
|
$(WX_LIBS) \
|
||||||
$(GUI_TK_LIBS) \
|
$(GUI_TK_LIBS) \
|
||||||
$(X_EXTRA_LIBS) \
|
$(X_EXTRA_LIBS) \
|
||||||
$(X_PRE_LIBS)
|
$(X_PRE_LIBS) \
|
||||||
|
$(THREADS_LINK)
|
||||||
|
|
||||||
# $(X_LIBS) -lX11 -lXext -lm gtk-config does this for me
|
# $(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.
|
# can be conveniently added to BIN_LINK in Makefile.in.
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
|
@@ -114,11 +114,12 @@ LINK_LIBS= \
|
|||||||
$(WX_LIBS) \
|
$(WX_LIBS) \
|
||||||
$(GUI_TK_LIBS) \
|
$(GUI_TK_LIBS) \
|
||||||
$(X_EXTRA_LIBS) \
|
$(X_EXTRA_LIBS) \
|
||||||
$(X_PRE_LIBS)
|
$(X_PRE_LIBS) \
|
||||||
|
$(THREADS_LINK)
|
||||||
|
|
||||||
# $(X_LIBS) -lX11 -lXext -lm gtk-config does this for me
|
# $(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.
|
# can be conveniently added to BIN_LINK in Makefile.in.
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
|
Reference in New Issue
Block a user