From a734e864538f70a496e7b54ded77ff424365d52b Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Tue, 31 Jul 2012 04:40:16 +0000 Subject: [PATCH] fix autotools/autoconf see also http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=8300&p=28416#p28416 --- configure.ac | 88 ++++++++++++++++++++++++++++--------------------- src/Makefile.am | 3 ++ 2 files changed, 53 insertions(+), 38 deletions(-) diff --git a/configure.ac b/configure.ac index 762f55fa2..e11a7a0c4 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,7 @@ case "$host" in PLATFORM_STRING="Linux" ;; *-*-darwin*) + AC_MSG_WARN([Hello]) AC_DEFINE(PLATFORM_APPLE, 1, [Platform is Apple]) opengl_LIBS="-framework AGL -framework OpenGL -framework GLUT" PLATFORM_STRING="Apple" @@ -52,6 +53,7 @@ case "$host" in ARCH_STRING="X86-64" ;; ppc-* | powerpc-*) + AC_MSG_WARN([HI THERE!]) AC_DEFINE(ARCH_PPC, 1, [Architecture is PowerPC]) ARCH_SPECIFIC_CFLAGS="" ARCH_STRING="PowerPC" @@ -87,44 +89,54 @@ AC_ARG_ENABLE([demos], AM_CONDITIONAL([CONDITIONAL_BUILD_DEMOS], [false]) dnl Check for OpenGL and GLUT -if test "x$drawstuff" = "xOSX"; then - AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1], - [Use the Apple OpenGL framework.]) - GL_LIBS="-framework GLUT -framework OpenGL -framework Carbon -framework AGL" - have_glut=yes -else - have_gl_headers=yes - AC_CHECK_HEADERS(GL/gl.h GL/glu.h GL/glext.h GL/glut.h, , - [have_gl_headers=no], - [[#ifdef WIN32 - #include - #endif - #if HAVE_GL_GL_H - #include - #endif - #if HAVE_GL_GLU_H - #include - #endif - ]]) - have_gl=no - have_glu=no - have_glut=no - TEMP_LDFLAGS="$LDFLAGS" - AC_CHECK_LIB(GL, main, [GL_LIBS="-lGL"; have_gl=yes]) - AC_CHECK_LIB(GLU, main, [GL_LIBS="-lGLU $GL_LIBS"; have_glu=yes], , -lGL) - AC_CHECK_LIB(GLUT, main, [GL_LIBS="-lGLUT -LGLU $GL_LIBS"; have_glut=yes], ,-lGLUT) - AC_CHECK_LIB(opengl32, main, [GL_LIBS="-lopengl32"; have_gl=yes]) - AC_CHECK_LIB(glu32, main, [GL_LIBS="-lglu32 $GL_LIBS"; have_glu=yes], , -lopengl32) - LDFLAGS="$TEMP_LDFLAGS" - if test $have_gl = no -o $have_glu = no -o $have_gl_headers = no; then - if test x$enable_demos = xyes; then - AC_MSG_WARN([Demos and Extras will not be built because OpenGL and GLUT doesn't seem to work. See `config.log' for details.]) - fi - enable_demos=no - else - AC_MSG_NOTICE([Found OpenGL]) - fi -fi + + +case "$host" in + *-*-darwin*) + AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1], + [Use the Apple OpenGL framework.]) + GL_LIBS="-framework GLUT -framework OpenGL -framework Carbon -framework AGL" + have_glut=yes + have_glu=yes + have_gl=yes + ;; + *) + have_gl_headers=yes + AC_CHECK_HEADERS(GL/gl.h GL/glu.h GL/glext.h GL/glut.h, , + [have_gl_headers=no], + [[#ifdef WIN32 + #include + #endif + #if HAVE_GL_GL_H + #include + #endif + #if HAVE_GL_GLU_H + #include + #endif + ]]) + have_gl=no + have_glu=no + have_glut=no + TEMP_LDFLAGS="$LDFLAGS" + AC_CHECK_LIB(GL, main, [GL_LIBS="-lGL"; have_gl=yes]) + AC_CHECK_LIB(GLU, main, [GL_LIBS="-lGLU $GL_LIBS"; have_glu=yes], , -lGL) + AC_CHECK_LIB(GLUT, main, [GL_LIBS="-lGLUT -LGLU $GL_LIBS"; have_glut=yes], ,-lGLUT) + AC_CHECK_LIB(opengl32, main, [GL_LIBS="-lopengl32"; have_gl=yes]) + AC_CHECK_LIB(glu32, main, [GL_LIBS="-lglu32 $GL_LIBS"; have_glu=yes], , -lopengl32) + LDFLAGS="$TEMP_LDFLAGS" + if test $have_gl = no -o $have_glu = no -o $have_gl_headers = no; then + if test x$enable_demos = xyes; then + AC_MSG_WARN([Demos and Extras will not be built because OpenGL and GLUT doesn't seem to work. See `config.log' for details.]) + fi + enable_demos=no + else + AC_MSG_NOTICE([Found OpenGL]) + fi + ;; +esac + + + AC_SUBST(GL_LIBS) diff --git a/src/Makefile.am b/src/Makefile.am index 10422022d..be736bacd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -95,6 +95,7 @@ libLinearMath_la_SOURCES = \ LinearMath/btAlignedAllocator.cpp \ LinearMath/btSerializer.cpp \ LinearMath/btConvexHull.cpp \ + LinearMath/btVector3.cpp \ LinearMath/btConvexHullComputer.cpp \ LinearMath/btHashMap.h \ LinearMath/btConvexHull.h \ @@ -220,6 +221,7 @@ libBulletCollision_la_SOURCES = \ BulletCollision/NarrowPhaseCollision/btManifoldPoint.h \ BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h \ BulletCollision/CollisionDispatch/btCollisionObject.h \ + BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h \ BulletCollision/CollisionDispatch/btGhostObject.h \ BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h \ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h \ @@ -488,6 +490,7 @@ nobase_bullet_include_HEADERS += \ BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h \ BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h \ BulletCollision/CollisionDispatch/btCollisionObject.h \ + BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h \ BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h \ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h \ BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h \