2006-06-17 18:17:17 +00:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Autoconf input script. Invoke the ./autogen.sh script to generate a
|
|
|
|
# configure script from this file.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
AC_PREREQ([2.54])
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Initialize Autoconf.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
AC_INIT(
|
|
|
|
[bullet],
|
2009-05-09 19:27:14 +00:00
|
|
|
[2.75],
|
2006-06-17 18:17:17 +00:00
|
|
|
[bullet@erwincoumans.com])
|
2008-10-02 22:23:01 +00:00
|
|
|
AC_CANONICAL_HOST
|
2006-06-17 18:17:17 +00:00
|
|
|
CS_PACKAGEINFO(
|
|
|
|
[Bullet Continuous Collision Detection and Physics Library],
|
2008-09-06 15:43:20 +00:00
|
|
|
[Copyright (c) 2005-2008 Erwin Coumans],
|
2007-03-08 16:04:17 +00:00
|
|
|
[http://www.bulletphysics.com])
|
2008-10-02 22:23:01 +00:00
|
|
|
AC_CONFIG_SRCDIR([configure.ac])
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_LIBTOOL
|
2006-06-17 18:17:17 +00:00
|
|
|
|
2008-10-03 21:27:01 +00:00
|
|
|
case "$host" in
|
|
|
|
*-*-mingw*|*-*-cygwin*)
|
|
|
|
AC_DEFINE(PLATFORM_WIN32, 1, [Platform is Win32])
|
|
|
|
opengl_LIBS="-lunsupported_platform"
|
|
|
|
PLATFORM_STRING="Win32"
|
|
|
|
;;
|
|
|
|
*-*-linux*)
|
|
|
|
AC_DEFINE(PLATFORM_LINUX, 1, [Platform is Linux])
|
|
|
|
opengl_LIBS="-lGL -lGLU -lglut"
|
|
|
|
PLATFORM_STRING="Linux"
|
|
|
|
;;
|
|
|
|
*-*-darwin*)
|
|
|
|
AC_DEFINE(PLATFORM_APPLE, 1, [Platform is Apple])
|
2008-10-03 22:20:20 +00:00
|
|
|
opengl_LIBS="-framework AGL -framework OpenGL -framework GLUT"
|
2008-10-03 21:27:01 +00:00
|
|
|
PLATFORM_STRING="Apple"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_WARN([*** Please add $host to configure.ac checks!])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(opengl_LIBS)
|
|
|
|
|
|
|
|
case "$host" in
|
|
|
|
i?86-* | k?-* | athlon-* | pentium*-)
|
|
|
|
AC_DEFINE(ARCH_X86, 1, [Architecture is x86])
|
2008-11-14 17:57:30 +00:00
|
|
|
ARCH_SPECIFIC_CFLAGS=""
|
2008-10-03 21:27:01 +00:00
|
|
|
ARCH_STRING="X86"
|
|
|
|
;;
|
|
|
|
x86_64-*)
|
|
|
|
AC_DEFINE(ARCH_X86_64, 1, [Architecture is x86-64])
|
2008-11-14 17:57:30 +00:00
|
|
|
ARCH_SPECIFIC_CFLAGS="-DUSE_ADDR64"
|
2008-10-03 21:27:01 +00:00
|
|
|
ARCH_STRING="X86-64"
|
|
|
|
;;
|
|
|
|
ppc-* | powerpc-*)
|
|
|
|
AC_DEFINE(ARCH_PPC, 1, [Architecture is PowerPC])
|
2008-11-14 17:57:30 +00:00
|
|
|
ARCH_SPECIFIC_CFLAGS=""
|
2008-10-03 21:27:01 +00:00
|
|
|
ARCH_STRING="PowerPC"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([Unknown Architecture])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
|
|
|
2006-06-17 18:17:17 +00:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Setup for the configuration header.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Check for tools.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
CS_PROG_CC
|
|
|
|
AS_IF([test -z "$CC"],
|
|
|
|
[AC_MSG_ERROR([Could not find a usable C compiler.])])
|
|
|
|
CS_PROG_CXX
|
|
|
|
AS_IF([test -z "$CXX"],
|
|
|
|
[AC_MSG_ERROR([Could not find a usable C++ compiler.])])
|
|
|
|
CS_PROG_LINK
|
|
|
|
|
|
|
|
CS_CHECK_COMMON_TOOLS_LINK
|
|
|
|
CS_CHECK_COMMON_TOOLS_BASIC
|
|
|
|
CS_CHECK_COMMON_TOOLS_DOC_DOXYGEN
|
|
|
|
|
|
|
|
CS_CHECK_PROGS([PERL], [perl5 perl])
|
|
|
|
CS_EMIT_BUILD_PROPERTY([PERL], [$PERL])
|
|
|
|
|
|
|
|
CS_CHECK_TEMPLATE_TOOLKIT2([emit])
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Check if C++ exceptions can be disabled.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
CS_EMIT_BUILD_FLAGS([how to disable C++ exceptions],
|
|
|
|
[cs_cv_prog_cxx_disable_exceptions], [CS_CREATE_TUPLE([-fno-exceptions])],
|
|
|
|
[C++], [COMPILER.C++FLAGS.EXCEPTIONS.DISABLE], [],
|
|
|
|
[CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS],
|
|
|
|
[$cs_cv_prog_cxx_disable_exceptions], [+])])
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Determine system type
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
CS_CHECK_HOST
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Check for syntax problems / header files
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Nothing yet.
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Check for GLUT.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
AS_IF([test $cs_host_family = windows],
|
|
|
|
[# Tack the GLUT that comes with bullet onto compiler & linker flags.
|
2007-12-05 20:34:32 +00:00
|
|
|
_AC_SRCDIRS(["."])
|
2006-06-17 18:17:17 +00:00
|
|
|
glut_cflags="-I$ac_top_srcdir/Glut"
|
|
|
|
glut_lflags="-L$ac_top_srcdir/Glut"
|
|
|
|
CFLAGS="$CFLAGS $glut_cflags"
|
|
|
|
LDFLAGS="$LDFLAGS $glut_lflags"
|
|
|
|
CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [$glut_cflags], [+])
|
|
|
|
CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [$glut_lflags], [+])
|
|
|
|
])
|
2006-12-23 03:09:33 +00:00
|
|
|
CS_CHECK_GLUT
|
|
|
|
|
2008-10-02 22:23:01 +00:00
|
|
|
|
2006-06-17 18:17:17 +00:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Package configuration switches.
|
|
|
|
#----------------------------------------------------------------------------
|
2009-05-09 19:27:14 +00:00
|
|
|
AC_ARG_ENABLE([multithreaded],
|
|
|
|
[AC_HELP_STRING([--enable-multithreaded],
|
|
|
|
[build BulletMultiThreaded (default NO)])],
|
|
|
|
[disable_multithreaded=no], [disable_multithreaded=yes])
|
|
|
|
AC_MSG_CHECKING([BulletMultiThreaded])
|
|
|
|
AS_IF([test "$disable_multithreaded" = yes], [build_multithreaded=no], [build_multithreaded=yes])
|
|
|
|
AC_MSG_RESULT([$build_multithreaded])
|
|
|
|
AM_CONDITIONAL([CONDITIONAL_BUILD_MULTITHREADED], [test "$build_multithreaded" = yes])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([demos],
|
|
|
|
[AS_HELP_STRING([--disable-demos],
|
|
|
|
[disable Bullet demos])],
|
|
|
|
[],
|
|
|
|
[enable_demos=yes])
|
|
|
|
AM_CONDITIONAL([CONDITIONAL_BUILD_DEMOS], [false])
|
|
|
|
if test "x$enable_demos" != xno; then
|
|
|
|
AC_MSG_NOTICE([Building Bullet demos])
|
|
|
|
AM_CONDITIONAL([CONDITIONAL_BUILD_DEMOS],[true])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-17 18:17:17 +00:00
|
|
|
AC_ARG_ENABLE([debug],
|
|
|
|
[AC_HELP_STRING([--enable-debug],
|
|
|
|
[build with debugging information (default NO)])],
|
|
|
|
[], [enable_debug=no])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([build mode])
|
|
|
|
AS_IF([test $enable_debug = yes], [build_mode=debug], [build_mode=optimize])
|
|
|
|
AC_MSG_RESULT([$build_mode])
|
|
|
|
|
|
|
|
CS_EMIT_BUILD_PROPERTY([MODE], [$build_mode])
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Emit install paths and package information.
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
CS_OUTPUT_INSTALLDIRS
|
|
|
|
CS_EMIT_PACKAGEINFO
|
|
|
|
|
2008-10-02 22:23:01 +00:00
|
|
|
|
2009-05-09 19:27:14 +00:00
|
|
|
CFLAGS="$ARCH_SPECIFIC_CFLAGS $CFLAGS"
|
2008-11-14 17:57:30 +00:00
|
|
|
CXXFLAGS="$ARCH_SPECIFIC_CFLAGS $CXXFLAGS $CFLAGS"
|
2006-06-17 18:17:17 +00:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Emit generated files.
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
CS_JAMCONFIG_OUTPUT([Jamconfig])
|
2009-01-26 21:42:34 +00:00
|
|
|
AC_CONFIG_FILES([bullet.pc Jamfile Makefile Demos/Makefile Demos/SoftDemo/Makefile Demos/AllBulletDemos/Makefile Demos/MultiThreadedDemo/Makefile Demos/ColladaDemo/Makefile Demos/OpenGL/Makefile Demos/BasicDemo/Makefile Demos/CcdPhysicsDemo/Makefile Demos/VehicleDemo/Makefile Demos/TerrainDemo/Makefile src/Makefile Extras/Makefile])
|
2006-06-17 18:17:17 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
AC_MSG_NOTICE([
|
2008-10-03 22:45:54 +00:00
|
|
|
You can type 'make' or 'jam' to build Bullet.
|
|
|
|
Alternatively, you can use cmake or use the wksbullet.sln visual studio x solutions in the msvc/x folder.
|
2006-06-17 18:17:17 +00:00
|
|
|
|
2008-10-03 22:45:54 +00:00
|
|
|
CMake home:http://cmake.org
|
2006-06-17 18:17:17 +00:00
|
|
|
Jam home: http://www.perforce.com/jam/jam.html
|
|
|
|
Jam source: ftp://ftp.perforce.com/jam/
|
2008-10-02 22:23:01 +00:00
|
|
|
|
|
|
|
Please type 'make' to build Bullet
|
2006-06-17 18:17:17 +00:00
|
|
|
])
|