if test "$CXX" = "CC"; then
AR="CC -ar"
ARFLAGS="-o"
+ CXXFLAGS="$CXXFLAGS -I$(top_srcdir)/simgear/compatibility"
fi
;;
esac
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="$FLAGS"
+ 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)
+dnl check for glut location
+AC_CHECK_HEADER(GL/glut.h)
+if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
+ AC_DEFINE([GLUT_H], "GL/glut.h", [Define as glut.h include location])
+else
+ AC_CHECK_HEADER(GLUT/glut.h)
+ if test "x$ac_cv_header_GLUT_glut_h" = "xyes"; then
+ AC_DEFINE([GLUT_H], "GLUT/glut.h", [Define as glut.h include location])
+ else
+ echo "Neither GL/glut.h nor GLUT/glut.h found. Cannot continue"
+ exit
+ fi
+fi
+
+dnl check for OpenGL related libraries
case "${host}" in
*-*-cygwin* | *-*-mingw32*)
dnl CygWin under Windoze.
dnl add -lwsock32 for mingwin
case "${host}" in
*-*-mingw32*)
- LIBS="$LIBS -lws2_32"
+ base_LIBS="$base_LIBS -lws2_32"
;;
esac
esac
-dnl check for glut location
-AC_CHECK_HEADER(GL/glut.h)
-if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
- AC_DEFINE([GLUT_H], "GL/glut.h", [Define as glut.h include location])
-else
- AC_CHECK_HEADER(GLUT/glut.h)
- if test "x$ac_cv_header_GLUT_glut_h" = "xyes"; then
- AC_DEFINE([GLUT_H], "GLUT/glut.h", [Define as glut.h include location])
- else
- echo "Neither GL/glut.h nor GLUT/glut.h found. Cannot continue"
- exit
- fi
-fi
-
opengl_LIBS="$LIBS"
LIBS="$base_LIBS"
echo "If your OS does not provide an installable package for MetaKit"
echo "you will have to compile and install it first yourself. A copy"
echo "of metakit-$(VERSION).tar.gz is included with SimGear. You will"
- echo "have to untar this source code, and follow it's included instructions"
+ echo "have to untar this source code, and follow its included instructions"
echo "to compile and install on your system."
echo
echo "configure aborted."
AC_MSG_RESULT(yes)
)
+LIBS="$saved_LIBS"
+
AC_LANG_POP
dnl Check for system installed zlib
echo "If your OS does not provide an installable package for zlib"
echo "you will have to compile and install it first yourself. A copy"
echo "of zlib-1.1.4.tar.gz is included with SimGear. You will"
- echo "have to untar this source code, and follow it's included instructions"
+ echo "have to untar this source code, and follow its included instructions"
echo "to compile and install on your system."
echo
echo "configure aborted."
src-libs/Makefile \
simgear/Makefile \
simgear/version.h \
+ simgear/compatibility/Makefile \
simgear/bucket/Makefile \
simgear/debug/Makefile \
simgear/ephemeris/Makefile \