diff --git a/Demos/BasicDemo/Makefile.am b/Demos/BasicDemo/Makefile.am new file mode 100644 index 000000000..e5a630dee --- /dev/null +++ b/Demos/BasicDemo/Makefile.am @@ -0,0 +1,5 @@ +bin_PROGRAMS=BasicDemo + +BasicDemo_SOURCES=BasicDemo.cpp BasicDemo.h +BasicDemo_CXXFLAGS=-I@top_builddir@src -I@top_builddir@Demos/OpenGL +BasicDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lbulletdynamics -lbulletcollision -lbulletmath @opengl_LIBS@ diff --git a/Demos/CcdPhysicsDemo/Makefile.am b/Demos/CcdPhysicsDemo/Makefile.am new file mode 100644 index 000000000..98d71bc8e --- /dev/null +++ b/Demos/CcdPhysicsDemo/Makefile.am @@ -0,0 +1,5 @@ +bin_PROGRAMS=CcdPhysicsDemo + +CcdPhysicsDemo_SOURCES=CcdPhysicsDemo.cpp CcdPhysicsDemo.h +CcdPhysicsDemo_CXXFLAGS=-I@top_builddir@src -I@top_builddir@Demos/OpenGL +CcdPhysicsDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lbulletdynamics -lbulletcollision -lbulletmath @opengl_LIBS@ diff --git a/Demos/VehicleDemo/Makefile.am b/Demos/VehicleDemo/Makefile.am new file mode 100644 index 000000000..1dcd15c17 --- /dev/null +++ b/Demos/VehicleDemo/Makefile.am @@ -0,0 +1,5 @@ +bin_PROGRAMS=VehicleDemo + +VehicleDemo_SOURCES=VehicleDemo.cpp VehicleDemo.h +VehicleDemo_CXXFLAGS=-I@top_builddir@src -I@top_builddir@Demos/OpenGL +VehicleDemo_LDADD=-L../OpenGL -lbulletopenglsupport -L../../src -lbulletdynamics -lbulletcollision -lbulletmath @opengl_LIBS@ diff --git a/Makefile.am b/Makefile.am index acaebf605..f936aaa64 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS=src Demos/OpenGL \ No newline at end of file +SUBDIRS=src Demos/OpenGL Demos/BasicDemo Demos/VehicleDemo Demos/CcdPhysicsDemo \ No newline at end of file diff --git a/autogen.sh b/autogen.sh index 7d1c4dfd9..ee6f2fe98 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,4 @@ #! /bin/sh -set -x if test ! -f configure.ac ; then echo "*** Please invoke this script from directory containing configure.ac." diff --git a/configure.ac b/configure.ac index 0d4611b0f..bd8293f0b 100644 --- a/configure.ac +++ b/configure.ac @@ -80,7 +80,42 @@ AS_IF([test $cs_host_family = windows], CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [$glut_cflags], [+]) CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [$glut_lflags], [+]) ]) -CS_CHECK_GLUT + +#---------------------------------------------------------------------------- +# check for OpenGL related libraries +#---------------------------------------------------------------------------- + +case "${host}" in +*darwin*|*macosx*) + opengl_LIBS="$LIBS -framework Carbon -framework OpenGL -framework IOKit -framework AGL" + ;; + +*-*-cygwin* | *-*-mingw32*) + dnl CygWin under Windoze. + + echo Win32 specific hacks... + AC_DEFINE([WIN32], 1, [Define for Win32 platforms]) + AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms]) + + opengl_LIBS="-lglut32 -lglu32 -lopengl32 -luser32 -lgdi32 -lm -lwinmm" + joystick_LIBS="$joystick_LIBS -lwinmm" + + echo "Will link apps with $LIBS" + ;; +*) + dnl X-Windows based machines + + save_LIBS=$LIBS + AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ]) + AC_SEARCH_LIBS(glutInit, [ glut ]) + opengl_LIBS="$LIBS" + LIBS=$save_LIBS + if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then + dnl if GLcore found, then also check for GL + AC_SEARCH_LIBS(glXCreateContext, GL) + fi + AC_SUBST(opengl_LIBS,[$opengl_LIBS]) +esac #---------------------------------------------------------------------------- # Package configuration switches. @@ -106,7 +141,8 @@ CS_EMIT_PACKAGEINFO # Emit generated files. #---------------------------------------------------------------------------- CS_JAMCONFIG_OUTPUT([Jamconfig]) -AC_CONFIG_FILES([Jamfile bullet.pc Makefile src/Makefile Demos/OpenGL/Makefile]) +AC_CONFIG_FILES([Jamfile bullet.pc Makefile src/Makefile Demos/OpenGL/Makefile Demos/BasicDemo/Makefile Demos/VehicleDemo/Makefile Demos/CcdPhysicsDemo/Makefile]) + AC_OUTPUT AC_MSG_NOTICE([