Disable threading by default.

Remove 2.0 FL_API defines from threads.h, since that header is not part
of the library.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2001-12-14 21:02:24 +00:00
parent 40750fb352
commit 4ef0817b83
4 changed files with 25 additions and 17 deletions
+11 -6
View File
@@ -1,7 +1,7 @@
dnl -*- sh -*- dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf" dnl the "configure" script is made from this by running GNU "autoconf"
dnl dnl
dnl "$Id: configure.in,v 1.33.2.31.2.40 2001/12/14 19:34:29 easysw Exp $" dnl "$Id: configure.in,v 1.33.2.31.2.41 2001/12/14 21:02:24 easysw Exp $"
dnl dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl dnl
@@ -159,7 +159,7 @@ AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [defau
;; ;;
esac esac
fi]) fi])
AC_ARG_ENABLE(threads, [ --disable-threads disable multi-threading support],,enable_threads=yes) AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support],,enable_threads=no)
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX AC_PROG_CXX
@@ -263,11 +263,13 @@ dnl some environments need postprocessing (Darwin, MacOS)
POSTBUILD=: POSTBUILD=:
dnl Check for pthreads for multi-threaded apps... dnl Check for pthreads for multi-threaded apps...
if test "$enable_threads" = yes; then if test x"$enable_threads" = xyes; then
AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H)) AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H))
AC_SEARCH_LIBS(pthread_create, pthread) AC_SEARCH_LIBS(pthread_create, pthread)
fi fi
THREADS=""
case $uname in case $uname in
CYGWIN*) CYGWIN*)
dnl Cygwin environment... dnl Cygwin environment...
@@ -289,8 +291,9 @@ case $uname in
GLDEMOS="" GLDEMOS=""
fi fi
if test "x$ac_cv_search_pthread_create" != xno; then if test "x$ac_cv_search_pthread_create" != xno -a x"$enable_threads" = xyes; then
AC_DEFINE(HAVE_PTHREAD) AC_DEFINE(HAVE_PTHREAD)
THREADS="threads.exe"
fi fi
# Don't make symlinks since Windows is not case sensitive. # Don't make symlinks since Windows is not case sensitive.
@@ -319,8 +322,9 @@ case $uname in
;; ;;
*) *)
if test "x$ac_cv_search_pthread_create" != xno; then if test "x$ac_cv_search_pthread_create" != xno -a x"$enable_threads" = xyes; then
AC_DEFINE(HAVE_PTHREAD) AC_DEFINE(HAVE_PTHREAD)
THREADS="threads"
fi fi
dnl Check for X11... dnl Check for X11...
@@ -395,6 +399,7 @@ AC_SUBST(HLINKS)
AC_SUBST(GLDEMOS) AC_SUBST(GLDEMOS)
AC_SUBST(GLLIB) AC_SUBST(GLLIB)
AC_SUBST(POSTBUILD) AC_SUBST(POSTBUILD)
AC_SUBST(THREADS)
dnl Figure out the appropriate formatted man page extension... dnl Figure out the appropriate formatted man page extension...
case "$uname" in case "$uname" in
@@ -610,5 +615,5 @@ AC_OUTPUT(makeinclude fltk.list fltk-config FL/Makefile)
chmod +x fltk-config chmod +x fltk-config
dnl dnl
dnl End of "$Id: configure.in,v 1.33.2.31.2.40 2001/12/14 19:34:29 easysw Exp $". dnl End of "$Id: configure.in,v 1.33.2.31.2.41 2001/12/14 21:02:24 easysw Exp $".
dnl dnl
+5 -2
View File
@@ -1,5 +1,5 @@
# #
# "$Id: makeinclude.in,v 1.7.2.11.2.12 2001/12/14 19:34:29 easysw Exp $" # "$Id: makeinclude.in,v 1.7.2.11.2.13 2001/12/14 21:02:24 easysw Exp $"
# #
# Make include file for the Fast Light Tool Kit (FLTK). # Make include file for the Fast Light Tool Kit (FLTK).
# @configure_input@ # @configure_input@
@@ -67,6 +67,9 @@ IMAGELIBS =@IMAGELIBS@
# Do we build the OpenGL demos? # Do we build the OpenGL demos?
GLDEMOS =@GLDEMOS@ GLDEMOS =@GLDEMOS@
# Do we build the threads demo?
THREADS =@THREADS@
# The extension to use for executables... # The extension to use for executables...
EXEEXT =@EXEEXT@ EXEEXT =@EXEEXT@
@@ -109,5 +112,5 @@ CAT3EXT =@CAT3EXT@
mv t.z $@ mv t.z $@
# #
# End of "$Id: makeinclude.in,v 1.7.2.11.2.12 2001/12/14 19:34:29 easysw Exp $". # End of "$Id: makeinclude.in,v 1.7.2.11.2.13 2001/12/14 21:02:24 easysw Exp $".
# #
+3 -3
View File
@@ -1,5 +1,5 @@
# #
# "$Id: Makefile,v 1.19.2.7.2.20 2001/12/14 19:34:30 easysw Exp $" # "$Id: Makefile,v 1.19.2.7.2.21 2001/12/14 21:02:24 easysw Exp $"
# #
# Test/example program makefile for the Fast Light Tool Kit (FLTK). # Test/example program makefile for the Fast Light Tool Kit (FLTK).
# #
@@ -136,7 +136,7 @@ ALL = \
subwindow$(EXEEXT) \ subwindow$(EXEEXT) \
symbols$(EXEEXT) \ symbols$(EXEEXT) \
tabs$(EXEEXT) \ tabs$(EXEEXT) \
threads$(EXEEXT) \ $(THREADS) \
tile$(EXEEXT) \ tile$(EXEEXT) \
tiled_image$(EXEEXT) \ tiled_image$(EXEEXT) \
valuators$(EXEEXT) valuators$(EXEEXT)
@@ -253,5 +253,5 @@ uninstall:
@echo Nothing to uninstall in test directory. @echo Nothing to uninstall in test directory.
# #
# End of "$Id: Makefile,v 1.19.2.7.2.20 2001/12/14 19:34:30 easysw Exp $". # End of "$Id: Makefile,v 1.19.2.7.2.21 2001/12/14 21:02:24 easysw Exp $".
# #
+6 -6
View File
@@ -1,5 +1,5 @@
// //
// "$Id: threads.h,v 1.1.2.2 2001/12/09 20:26:24 easysw Exp $" // "$Id: threads.h,v 1.1.2.3 2001/12/14 21:02:24 easysw Exp $"
// //
// Simple threading API for the Fast Light Tool Kit (FLTK). // Simple threading API for the Fast Light Tool Kit (FLTK).
// //
@@ -118,7 +118,7 @@ public:
# endif # endif
# else // Use Windows threading... # elif defined(WIN32) // Use Windows threading...
# include <windows.h> # include <windows.h>
# include <process.h> # include <process.h>
@@ -129,7 +129,7 @@ static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) {
return t = (Fl_Thread)_beginthread((void( __cdecl * )( void * ))f, 0, p); return t = (Fl_Thread)_beginthread((void( __cdecl * )( void * ))f, 0, p);
} }
class FL_API Fl_Mutex { class Fl_Mutex {
friend class Fl_SignalMutex; friend class Fl_SignalMutex;
CRITICAL_SECTION cs; CRITICAL_SECTION cs;
Fl_Mutex(const Fl_Mutex&); Fl_Mutex(const Fl_Mutex&);
@@ -141,7 +141,7 @@ public:
~Fl_Mutex() {DeleteCriticalSection(&cs);} ~Fl_Mutex() {DeleteCriticalSection(&cs);}
}; };
class FL_API Fl_SignalMutex : public Fl_Mutex { class Fl_SignalMutex : public Fl_Mutex {
HANDLE event; HANDLE event;
public: public:
Fl_SignalMutex() : Fl_Mutex() {event = CreateEvent(0, FALSE, FALSE, 0);} Fl_SignalMutex() : Fl_Mutex() {event = CreateEvent(0, FALSE, FALSE, 0);}
@@ -156,9 +156,9 @@ public:
} }
}; };
# endif // !WIN32 # endif // !HAVE_PTHREAD_H
#endif // !Threads_h #endif // !Threads_h
// //
// End of "$Id: threads.h,v 1.1.2.2 2001/12/09 20:26:24 easysw Exp $". // End of "$Id: threads.h,v 1.1.2.3 2001/12/14 21:02:24 easysw Exp $".
// //