Configure check for pthreads.
This commit is contained in:
@@ -313,6 +313,7 @@ INPUT = \
|
|||||||
simgear/sg_inlines.h \
|
simgear/sg_inlines.h \
|
||||||
simgear/sg_traits.hxx \
|
simgear/sg_traits.hxx \
|
||||||
simgear/sg_zlib.h \
|
simgear/sg_zlib.h \
|
||||||
|
simgear/threads \
|
||||||
simgear/sky \
|
simgear/sky \
|
||||||
simgear/timing \
|
simgear/timing \
|
||||||
simgear/xml
|
simgear/xml
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ echo CC = $CC
|
|||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
AC_PROG_CPP
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
@@ -94,6 +95,15 @@ AC_CHECK_LIB(m, cos)
|
|||||||
|
|
||||||
base_LIBS="$LIBS"
|
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(socket, socket)
|
||||||
AC_CHECK_LIB(X11, XCreateWindow)
|
AC_CHECK_LIB(X11, XCreateWindow)
|
||||||
AC_CHECK_LIB(Xext, XShmCreateImage)
|
AC_CHECK_LIB(Xext, XShmCreateImage)
|
||||||
|
|||||||
+7
-2
@@ -16,6 +16,12 @@ else
|
|||||||
ZLIB_DIRS = zlib
|
ZLIB_DIRS = zlib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if HAVE_THREADS
|
||||||
|
SGTHREAD_DIR = threads
|
||||||
|
else
|
||||||
|
SGTHREAD_DIR =
|
||||||
|
endif
|
||||||
|
|
||||||
# METAR_DIRS =
|
# METAR_DIRS =
|
||||||
METAR_DIRS = metar
|
METAR_DIRS = metar
|
||||||
|
|
||||||
@@ -38,8 +44,7 @@ SUBDIRS = \
|
|||||||
screen \
|
screen \
|
||||||
$(SERIAL_DIRS) \
|
$(SERIAL_DIRS) \
|
||||||
sky \
|
sky \
|
||||||
threads \
|
$(SGTHREAD_DIR)
|
||||||
timing \
|
timing \
|
||||||
xgl \
|
xgl \
|
||||||
$(ZLIB_DIRS)
|
$(ZLIB_DIRS)
|
||||||
|
|
||||||
|
|||||||
@@ -197,6 +197,9 @@
|
|||||||
/* Define if you have the m library (-lm). */
|
/* Define if you have the m library (-lm). */
|
||||||
#undef HAVE_LIBM
|
#undef HAVE_LIBM
|
||||||
|
|
||||||
|
/* Define if you have the pthread library (-lpthread). */
|
||||||
|
#undef HAVE_LIBPTHREAD
|
||||||
|
|
||||||
/* Define if you have the socket library (-lsocket). */
|
/* Define if you have the socket library (-lsocket). */
|
||||||
#undef HAVE_LIBSOCKET
|
#undef HAVE_LIBSOCKET
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user