X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=configure.ac;h=2136625ba2dc490f6d0bdeb4a4733d8b32e79e47;hb=8be760b594f5e245e0a69efdef0baddab64193c8;hp=4482cdc3b4f9acadda293fd7beaa84553b26d987;hpb=a0a0c8e3085732d6a5914f34e77670f6c7375f6e;p=simgear.git diff --git a/configure.ac b/configure.ac index 4482cdc3..2136625b 100644 --- a/configure.ac +++ b/configure.ac @@ -147,6 +147,25 @@ if test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h CXXFLAGS="$CXXFLAGS -D_REENTRANT" CFLAGS="$CFLAGS -D_REENTRANT" fi +if test "x$ac_cv_lib_pthread_pthread_exit" != "xyes" -a "x$ac_cv_header_pthread_h" = "xyes"; then + dnl FreeBSD: System has pthread.h, but -lpthread library check + dnl fails. See if we need -pthread instead of -lpthread and look + dnl for the functions in libc_r. + save_CXXFLAGS="$CXXFLAGS" + save_CFLAGS="$CFLAGS" + CXXFLAGS="-pthread $CXXFLAGS" + CFLAGS="-pthread $FLAGS" + save_LIBS=$LIBS + AC_CHECK_LIB(c_r, pthread_exit) + if test "x$ac_cv_lib_c_r_pthread_exit" != "xyes"; then + CXXFLAGS=$save_CXXFLAGS + CFLAGS=$save_CFLAGS + else + dnl This is cheating a bit. pthread_exit comes with using -pthread, not -lpthread + ac_cv_lib_pthread_pthread_exit="yes" + fi + LIBS=$save_LIBS +fi AM_CONDITIONAL(HAVE_THREADS, test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes") AC_CHECK_LIB(socket, socket) @@ -360,7 +379,7 @@ dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS( \ fcntl.h getopt.h malloc.h memory.h stdint.h stdlib.h sys/param.h \ - sys/stat.h sys/time.h sys/timeb.h unistd.h winbase.h values.h ) + sys/stat.h sys/time.h sys/timeb.h unistd.h values.h ) if test "x$ac_cv_header_stdint_h" = "xyes"; then AC_DEFINE([HAVE_STDINT_H], 1, [Define if stdint.h exists]) @@ -396,11 +415,17 @@ AC_CONFIG_FILES([ \ simgear/math/Makefile \ simgear/metar/Makefile \ simgear/misc/Makefile \ + simgear/props/Makefile \ simgear/route/Makefile \ + simgear/scene/Makefile \ + simgear/scene/material/Makefile \ + simgear/scene/model/Makefile \ + simgear/scene/tgdb/Makefile \ simgear/screen/Makefile \ simgear/serial/Makefile \ simgear/sky/Makefile \ simgear/sky/clouds3d/Makefile \ + simgear/sound/Makefile \ simgear/threads/Makefile \ simgear/timing/Makefile \ simgear/xgl/Makefile \