Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 173 lines (149 sloc) 6.639 kb
7cb0ad9 -Initial commit of Bullet port.
Chris Culy authored
1 #----------------------------------------------------------------------------
2 # Autoconf input script. Invoke the ./autogen.sh script to generate a
3 # configure script from this file.
4 #----------------------------------------------------------------------------
5 AC_PREREQ([2.54])
6
7 #----------------------------------------------------------------------------
8 # Initialize Autoconf.
9 #----------------------------------------------------------------------------
10 AC_INIT(
11 [bullet],
cd3e3b9 Ken Whatmough Bring Bullet 2.81 to BlackBerry with support for NEON optimizations.
kwhatmough authored
12 [2.81],
7cb0ad9 -Initial commit of Bullet port.
Chris Culy authored
13 [bullet@erwincoumans.com])
14 AC_CANONICAL_HOST
15 AC_CONFIG_SRCDIR([configure.ac])
16 AM_INIT_AUTOMAKE
17 AM_PROG_CC_C_O
18 AC_PROG_CXX
19 AC_PROG_LIBTOOL
20
21 case "$host" in
22 *-*-mingw*|*-*-cygwin*)
23 AC_DEFINE(PLATFORM_WIN32, 1, [Platform is Win32])
24 opengl_LIBS="-lunsupported_platform"
25 PLATFORM_STRING="Win32"
26 ;;
27 *-*-linux*)
28 AC_DEFINE(PLATFORM_LINUX, 1, [Platform is Linux])
29 opengl_LIBS="-lGL -lGLU -lglut"
30 PLATFORM_STRING="Linux"
31 ;;
32 *-*-darwin*)
cd3e3b9 Ken Whatmough Bring Bullet 2.81 to BlackBerry with support for NEON optimizations.
kwhatmough authored
33 AC_MSG_WARN([Hello])
7cb0ad9 -Initial commit of Bullet port.
Chris Culy authored
34 AC_DEFINE(PLATFORM_APPLE, 1, [Platform is Apple])
35 opengl_LIBS="-framework AGL -framework OpenGL -framework GLUT"
36 PLATFORM_STRING="Apple"
37 ;;
38 *)
39 AC_MSG_WARN([*** Please add $host to configure.ac checks!])
40 ;;
41 esac
42 AC_SUBST(opengl_LIBS)
43
44 case "$host" in
45 i?86-* | k?-* | athlon-* | pentium*-)
46 AC_DEFINE(ARCH_X86, 1, [Architecture is x86])
47 ARCH_SPECIFIC_CFLAGS=""
48 ARCH_STRING="X86"
49 ;;
50 x86_64-*)
51 AC_DEFINE(ARCH_X86_64, 1, [Architecture is x86-64])
52 ARCH_SPECIFIC_CFLAGS="-DUSE_ADDR64"
53 ARCH_STRING="X86-64"
54 ;;
55 ppc-* | powerpc-*)
cd3e3b9 Ken Whatmough Bring Bullet 2.81 to BlackBerry with support for NEON optimizations.
kwhatmough authored
56 AC_MSG_WARN([HI THERE!])
7cb0ad9 -Initial commit of Bullet port.
Chris Culy authored
57 AC_DEFINE(ARCH_PPC, 1, [Architecture is PowerPC])
58 ARCH_SPECIFIC_CFLAGS=""
59 ARCH_STRING="PowerPC"
60 ;;
61 *)
62 AC_MSG_ERROR([Unknown Architecture])
63 ;;
64 esac
65 AC_C_BIGENDIAN
66
67
68 #----------------------------------------------------------------------------
69 # Setup for the configuration header.
70 #----------------------------------------------------------------------------
71 AC_CONFIG_HEADERS([config.h])
72 #----------------------------------------------------------------------------
73 # Package configuration switches.
74 #----------------------------------------------------------------------------
75 AC_ARG_ENABLE([multithreaded],
76 [AC_HELP_STRING([--enable-multithreaded],
77 [build BulletMultiThreaded (default NO)])],
78 [disable_multithreaded=no], [disable_multithreaded=yes])
79 AC_MSG_CHECKING([BulletMultiThreaded])
80 AS_IF([test "$disable_multithreaded" = yes], [build_multithreaded=no], [build_multithreaded=yes])
81 AC_MSG_RESULT([$build_multithreaded])
82 AM_CONDITIONAL([CONDITIONAL_BUILD_MULTITHREADED], [test "$build_multithreaded" = yes])
83
84 AC_ARG_ENABLE([demos],
85 [AS_HELP_STRING([--disable-demos],
86 [disable Bullet demos])],
87 [],
88 [enable_demos=yes])
89 AM_CONDITIONAL([CONDITIONAL_BUILD_DEMOS], [false])
90
91 dnl Check for OpenGL and GLUT
cd3e3b9 Ken Whatmough Bring Bullet 2.81 to BlackBerry with support for NEON optimizations.
kwhatmough authored
92
93
94 case "$host" in
95 *-*-darwin*)
96 AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1],
97 [Use the Apple OpenGL framework.])
98 GL_LIBS="-framework GLUT -framework OpenGL -framework Carbon -framework AGL"
99 have_glut=yes
100 have_glu=yes
101 have_gl=yes
102 ;;
103 *)
104 have_gl_headers=yes
105 AC_CHECK_HEADERS(GL/gl.h GL/glu.h GL/glext.h GL/glut.h, ,
106 [have_gl_headers=no],
107 [[#ifdef WIN32
108 #include <windows.h>
109 #endif
110 #if HAVE_GL_GL_H
111 #include <GL/gl.h>
112 #endif
113 #if HAVE_GL_GLU_H
114 #include <GL/glu.h>
115 #endif
116 ]])
117 have_gl=no
118 have_glu=no
119 have_glut=no
120 TEMP_LDFLAGS="$LDFLAGS"
121 AC_CHECK_LIB(GL, main, [GL_LIBS="-lGL"; have_gl=yes])
122 AC_CHECK_LIB(GLU, main, [GL_LIBS="-lGLU $GL_LIBS"; have_glu=yes], , -lGL)
123 AC_CHECK_LIB(GLUT, main, [GL_LIBS="-lGLUT -LGLU $GL_LIBS"; have_glut=yes], ,-lGLUT)
124 AC_CHECK_LIB(opengl32, main, [GL_LIBS="-lopengl32"; have_gl=yes])
125 AC_CHECK_LIB(glu32, main, [GL_LIBS="-lglu32 $GL_LIBS"; have_glu=yes], , -lopengl32)
126 LDFLAGS="$TEMP_LDFLAGS"
127 if test $have_gl = no -o $have_glu = no -o $have_gl_headers = no; then
128 if test x$enable_demos = xyes; then
129 AC_MSG_WARN([Demos and Extras will not be built because OpenGL and GLUT doesn't seem to work. See `config.log' for details.])
130 fi
131 enable_demos=no
132 else
133 AC_MSG_NOTICE([Found OpenGL])
134 fi
135 ;;
136 esac
137
138
139
7cb0ad9 -Initial commit of Bullet port.
Chris Culy authored
140 AC_SUBST(GL_LIBS)
141
142
143 if test "x$enable_demos" != xno; then
144 AC_MSG_NOTICE([Building Bullet demos])
145 AM_CONDITIONAL([CONDITIONAL_BUILD_DEMOS],[true])
146 fi
147
148
149
150 AC_ARG_ENABLE([debug],
151 [AC_HELP_STRING([--enable-debug],
152 [build with debugging information (default NO)])],
153 [], [enable_debug=no])
154
155 AC_MSG_CHECKING([build mode])
156 AS_IF([test $enable_debug = yes], [build_mode=debug], [build_mode=optimize])
157 AC_MSG_RESULT([$build_mode])
158
159
160
161 CFLAGS="$ARCH_SPECIFIC_CFLAGS $CFLAGS"
162 CXXFLAGS="$ARCH_SPECIFIC_CFLAGS $CXXFLAGS $CFLAGS"
163 #----------------------------------------------------------------------------
164 # Emit generated files.
165 #----------------------------------------------------------------------------
166 AC_CONFIG_FILES([bullet.pc Makefile Demos/Makefile Demos/SoftDemo/Makefile Demos/AllBulletDemos/Makefile Demos/MultiThreadedDemo/Makefile Demos/OpenGL/Makefile Demos/BasicDemo/Makefile Demos/CcdPhysicsDemo/Makefile Demos/VehicleDemo/Makefile Demos/TerrainDemo/Makefile src/Makefile Extras/Makefile])
167 AC_OUTPUT
168
169 AC_MSG_NOTICE([
170
171 Please type 'make' to build Bullet
172 ])
Something went wrong with that request. Please try again.