]> git.mxchange.org Git - simgear.git/commitdiff
Configure check for pthreads.
authorcurt <curt>
Mon, 9 Apr 2001 17:58:20 +0000 (17:58 +0000)
committercurt <curt>
Mon, 9 Apr 2001 17:58:20 +0000 (17:58 +0000)
Doxyfile
configure.in
simgear/Makefile.am
simgear/config.h.in

index 1efc699f2357951d340d3227400ed2a0e59d1b13..74fa7e5f39b4ff5d38aaeec5d89c416281699755 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -313,6 +313,7 @@ INPUT                  = \
        simgear/sg_inlines.h \
        simgear/sg_traits.hxx \
        simgear/sg_zlib.h \
+       simgear/threads \
        simgear/sky \
        simgear/timing \
        simgear/xml
index 07942fe7b01664b13f4872a6f8f5366ab6d6f7d6..27ca332cd816f4dc9e9971fb53664b3ac65d888b 100644 (file)
@@ -28,6 +28,7 @@ echo CC = $CC
 dnl Checks for programs.
 AC_PROG_MAKE_SET
 AC_PROG_CC
+AC_PROG_CPP
 AC_PROG_CXX
 AC_PROG_RANLIB
 AC_PROG_INSTALL
@@ -94,6 +95,15 @@ AC_CHECK_LIB(m, cos)
 
 base_LIBS="$LIBS"
 
+dnl Thread related checks
+AC_CHECK_LIB(pthread, pthread_exit)
+AC_CHECK_HEADER(pthread.h)
+if test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -o "x$ac_cv_header_pthread_h" = "xyes"; then
+    CXXFLAGS="$CXXFLAGS -D_REENTRANT"
+    CFLAGS="$CFLAGS -D_REENTRANT"
+fi
+AM_CONDITIONAL(HAVE_THREADS, test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -o "x$ac_cv_header_pthread_h" = "xyes")
+
 AC_CHECK_LIB(socket, socket)
 AC_CHECK_LIB(X11, XCreateWindow)
 AC_CHECK_LIB(Xext, XShmCreateImage)
index 3078a18defcc88b36ade144de5736d935f03b4e8..855b42dc3732cd4efc3581caf598140dfd1aa60a 100644 (file)
@@ -16,6 +16,12 @@ else
 ZLIB_DIRS = zlib
 endif
 
+if HAVE_THREADS
+SGTHREAD_DIR = threads
+else
+SGTHREAD_DIR = 
+endif
+
 # METAR_DIRS =
 METAR_DIRS = metar
 
@@ -38,8 +44,7 @@ SUBDIRS = \
        screen \
        $(SERIAL_DIRS) \
        sky \
-        threads \
+       $(SGTHREAD_DIR)
        timing \
        xgl \
        $(ZLIB_DIRS)
-
index 410fd7a88bd3ba3b12975594a8e9e5ff7be2264b..5dee430e723ca9f23e299a521d024e3359c4ecd4 100644 (file)
 /* Define if you have the m library (-lm).  */
 #undef HAVE_LIBM
 
+/* Define if you have the pthread library (-lpthread).  */
+#undef HAVE_LIBPTHREAD
+
 /* Define if you have the socket library (-lsocket).  */
 #undef HAVE_LIBSOCKET