Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/configure.in @ 3

Last change on this file since 3 was 3, checked in by anonymous, 17 years ago

=update

File size: 9.3 KB
Line 
1AC_PREREQ(2.50)
2
3AC_INIT([OGRE], [1.4.5])
4
5AC_CANONICAL_TARGET
6
7# New syntax; PACKAGE gets defined as 'OGRE' not 'ogre'
8#AM_INIT_AUTOMAKE([OGRE], 1.4.5)
9AM_INIT_AUTOMAKE([OGRE], 1.4.5)
10AC_CONFIG_HEADERS([OgreMain/include/config.h])
11
12dnl Check for programs
13AC_PROG_CC
14AC_PROG_CXX
15AM_PROG_CC_C_O
16AC_PROG_INSTALL
17AC_PROG_YACC
18AM_PROG_LEX
19
20dnl Setup target-specific parameters
21OGRE_SETUP_FOR_TARGET
22
23AC_DISABLE_STATIC
24AC_PROG_LIBTOOL
25AC_LIBTOOL_LANG_CXX_CONFIG
26
27# OGRE_CFLAGS contains the compiler flags crucial for stand-alone client
28# programs. They are exported via pkg-config, but not used while building
29# Ogre itself; instead, they are defined in config.h.
30AC_SUBST(OGRE_CFLAGS)
31
32# Check if compiler supports symbol visibility
33# There are quirks for x86_64 and debug builds with gcc < 4.2
34AC_LANG_PUSH(C++)
35AC_LIBTOOL_COMPILER_OPTION([if $CXX supports -fvisibility],
36    [ogre_prog_compiler_supports_visibility],
37    [-fvisibility=hidden -fvisibility-inlines-hidden], [],
38    [CFLAGS_VISIBILITY="-fvisibility=hidden -fvisibility-inlines-hidden -DOGRE_GCC_VISIBILITY";
39    case $target_cpu in
40        x86_64* )
41            if ! echo "$CFLAGS $CXXFLAGS" | grep -q "\-O"; then
42                echo "***********************************************************************"
43                echo "WARNING: It looks like you're doing a debug build for an x86_64 target."
44                echo "The -fvisibility-inlines-hidden flag is known to give problems in such"
45                echo "situations with libstdc++ < 4.2. Disabling the compiler flag."
46                echo "***********************************************************************"
47                CFLAGS_VISIBILITY="-fvisibility=hidden -DOGRE_GCC_VISIBILITY"
48            fi
49        ;;
50    esac
51    case $CXX in
52        icpc )
53            echo "***********************************************************************"
54            echo "WARNING: The intel compiler currently has bugs in its -fvisibility"
55            echo "implementation. Disabling the compiler flag."
56            echo "***********************************************************************"
57            CFLAGS_VISIBILITY=""
58        ;;
59    esac
60    ])
61AC_SUBST(CFLAGS_VISIBILITY)
62AC_LANG_POP
63
64dnl Other stuff we need
65OGRE_USE_STLPORT
66AC_CHECK_FT2(9.0.0)
67
68AC_CHECK_LIB(dl, dlopen)
69AC_CHECK_LIB(m, pow)
70AC_CHECK_LIB(z, gzopen)
71AC_CHECK_LIB(pthread, pthread_create)
72AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF,,snprintf))
73AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF,,vsnprintf))
74
75OGRE_CHECK_CPPUNIT
76
77PKG_CHECK_MODULES(ZZIPLIB, zziplib)
78AC_SUBST(ZZIPLIB_CFLAGS)
79AC_SUBST(ZZIPLIB_LIBS)
80
81dnl Get the GL and Platform libs for target build
82OGRE_GET_PLATFORM
83OGRE_GET_GLSUPPORT
84
85dnl Find the optional components we should build
86OGRE_CHECK_GUI
87OGRE_CHECK_DOUBLE
88OGRE_CHECK_THREADING
89OGRE_CHECK_FREEIMAGE
90OGRE_CHECK_DEVIL
91OGRE_CHECK_CG
92OGRE_CHECK_OPENEXR
93OGRE_CHECK_DX9
94OGRE_CHECK_SSE
95
96dnl Check to see if Ogre platform and GUI are the same
97dnl Fixes problem running make distclean when both are set to GLX
98OGRE_PLATFORM_AND_GUI
99
100dnl Check to see if user wants to disable building of demos (defaults is to build) - also checks for OIS
101OGRE_BUILD_DEMOS
102
103dnl Detect endianness
104OGRE_DETECT_ENDIAN
105
106dnl Check to see if -fPIC is required.
107OGRE_CHECK_PIC
108
109dnl Check to see if CEGUI is installed.
110OGRE_CHECK_CEGUI
111
112CFLAGS="$CFLAGS"
113CXXFLAGS="$CXXFLAGS"
114LIBS="$LIBS"
115
116dnl Define samples absolute install path
117ogreexecdir='${abs_top_builddir}/Samples/Common/bin'
118AC_SUBST(abs_top_builddir)
119AC_SUBST(ogreexecdir)
120
121dnl Create the makefiles
122AC_CONFIG_FILES([Makefile \
123    OgreMain/Makefile \
124    OgreMain/src/Makefile \
125    OgreMain/include/Makefile \
126    OgreMain/include/GLX/Makefile \
127    OgreMain/include/gtk/Makefile \
128    PlugIns/Makefile \
129    PlugIns/BSPSceneManager/Makefile \
130    PlugIns/BSPSceneManager/src/Makefile \
131    PlugIns/BSPSceneManager/include/Makefile \
132    PlugIns/CgProgramManager/Makefile \
133    PlugIns/CgProgramManager/src/Makefile \
134    PlugIns/CgProgramManager/include/Makefile \
135    PlugIns/OctreeSceneManager/Makefile \
136    PlugIns/OctreeSceneManager/src/Makefile \
137    PlugIns/OctreeSceneManager/include/Makefile \
138    PlugIns/ParticleFX/Makefile \
139    PlugIns/ParticleFX/src/Makefile \
140    PlugIns/ParticleFX/include/Makefile \
141    RenderSystems/Makefile \
142    RenderSystems/GL/Makefile \
143    RenderSystems/GL/src/Makefile \
144    RenderSystems/GL/include/Makefile \
145    RenderSystems/GL/src/atifs/Makefile \
146    RenderSystems/GL/src/atifs/include/Makefile \
147    RenderSystems/GL/src/atifs/src/Makefile \
148    RenderSystems/GL/src/GLSL/Makefile \
149    RenderSystems/GL/src/GLSL/include/Makefile \
150    RenderSystems/GL/src/GLSL/src/Makefile \
151    RenderSystems/GL/src/nvparse/Makefile \
152    RenderSystems/Direct3D9/Makefile \
153    RenderSystems/Direct3D9/src/Makefile \
154    RenderSystems/Direct3D9/include/Makefile \
155    Samples/Makefile \
156    Samples/Common/Makefile \
157    Samples/Common/include/Makefile \
158    Samples/Common/bin/Makefile \
159    Samples/BezierPatch/Makefile \
160    Samples/BezierPatch/src/Makefile \
161    Samples/BezierPatch/include/Makefile \
162    Samples/CameraTrack/Makefile \
163    Samples/CameraTrack/src/Makefile \
164    Samples/CelShading/Makefile \
165    Samples/CelShading/src/Makefile \
166    Samples/Compositor/Makefile \
167    Samples/Compositor/src/Makefile \
168    Samples/Compositor/include/Makefile \
169    Samples/CubeMapping/Makefile \
170    Samples/CubeMapping/src/Makefile \
171    Samples/CubeMapping/include/Makefile \
172    Samples/DeferredShading/Makefile \
173    Samples/DeferredShading/src/Makefile \
174    Samples/DeferredShading/include/Makefile  \
175    Samples/Dot3Bump/Makefile \
176    Samples/Dot3Bump/src/Makefile \
177    Samples/EnvMapping/Makefile \
178    Samples/EnvMapping/src/Makefile \
179    Samples/EnvMapping/include/Makefile \
180    Samples/FacialAnimation/Makefile \
181    Samples/FacialAnimation/src/Makefile \
182    Samples/Fresnel/Makefile \
183    Samples/Fresnel/src/Makefile \
184    Samples/Grass/Makefile \
185    Samples/Grass/src/Makefile \
186    Samples/Transpacency/Makefile \
187    Samples/Transpacency/src/Makefile \
188    Samples/Transpacency/include/Makefile \
189    Samples/Lighting/Makefile \
190    Samples/Lighting/src/Makefile \
191    Samples/Lighting/include/Makefile \
192    Samples/OceanDemo/Makefile \
193    Samples/OceanDemo/src/Makefile \
194    Samples/OceanDemo/include/Makefile \
195    Samples/ParticleFX/Makefile \
196    Samples/ParticleFX/src/Makefile \
197    Samples/ParticleFX/include/Makefile \
198    Samples/RenderToTexture/Makefile \
199    Samples/RenderToTexture/src/Makefile \
200    Samples/TextureFX/Makefile \
201    Samples/TextureFX/src/Makefile \
202    Samples/TextureFX/include/Makefile \
203    Samples/Shadows/Makefile \
204    Samples/Shadows/src/Makefile \
205    Samples/SkyBox/Makefile \
206    Samples/SkyBox/src/Makefile \
207    Samples/SkyBox/include/Makefile \
208    Samples/SkyDome/Makefile \
209    Samples/SkyDome/src/Makefile \
210    Samples/SkyDome/include/Makefile \
211    Samples/SkyPlane/Makefile \
212    Samples/SkyPlane/src/Makefile \
213    Samples/SkyPlane/include/Makefile \
214    Samples/Smoke/Makefile \
215    Samples/Smoke/src/Makefile \
216    Samples/Smoke/include/Makefile \
217    Samples/BSP/Makefile \
218    Samples/BSP/src/Makefile \
219    Samples/SkeletalAnimation/Makefile \
220    Samples/SkeletalAnimation/src/Makefile \
221    Samples/SkeletalAnimation/include/Makefile \
222    Samples/Terrain/Makefile \
223    Samples/Terrain/src/Makefile \
224    Samples/Terrain/include/Makefile \
225    Samples/Water/Makefile \
226    Samples/Water/src/Makefile \
227    Samples/Water/include/Makefile \
228    Samples/DynTex/Makefile \
229    Samples/DynTex/src/Makefile \
230    Samples/DynTex/include/Makefile \
231    Samples/VolumeTex/Makefile \
232    Samples/VolumeTex/src/Makefile \
233    Samples/VolumeTex/include/Makefile \
234    Samples/Instancing/Makefile \
235    Samples/Instancing/src/Makefile \
236    Samples/Instancing/include/Makefile \
237    Tests/Makefile \
238    Tests/src/Makefile \
239    Tools/Makefile \
240    Tools/MaterialUpgrader/Makefile \
241    Tools/MaterialUpgrader/src/Makefile \
242    Tools/MaterialUpgrader/include/Makefile \
243    Tools/MeshUpgrader/Makefile \
244    Tools/MeshUpgrader/src/Makefile \
245    Tools/XMLConverter/Makefile \
246    Tools/XMLConverter/src/Makefile \
247    Tools/XMLConverter/include/Makefile \
248    Tools/LightwaveConverter/Makefile \
249    Tools/LightwaveConverter/src/Makefile \
250    Tools/LightwaveConverter/include/Makefile \
251    OGRE.pc
252    ])
253
254AC_OUTPUT
255
256dnl Provide a nice final configuration status display
257
258ft_detected=yes
259test "x$no_ft" == "xyes" && ft_detected=no
260
261echo "--------===[ Configuration summary ]===--------"
262echo "    Target platform                 : $OGRE_PLATFORM"
263echo "    OpenGL Ogre support             : $OGRE_GLSUPPORT"
264echo "    GUI library to use              : $with_gui"
265echo "    Use double precision arithmetic : $build_double"
266echo "    Support for threading           : $build_threads"
267echo "    Use STLport                     : $ac_cv_use_stlport"
268echo "    Use FreeType                    : $ft_detected"
269echo "    Use FreeImage                   : $build_freeimage"
270echo "    Use DevIL                       : $build_il"
271echo "    Build OGRE demos                : $build_ogre_demos"
272test "x$build_ogre_demos" == "xyes" && \
273echo "    Build CEGUI demos               : $build_cegui_sample"
274echo "    Build the OpenEXR plugin        : $build_exr"
275echo "    Build the Cg plugin             : $build_cg"
276echo "    Build the DirectX 9 plugin      : $build_dx9"
277echo "--------===============================--------"
Note: See TracBrowser for help on using the repository browser.