[5] | 1 | AC_PREREQ(2.50) |
---|
| 2 | |
---|
| 3 | AC_INIT([OGRE], [1.4.5]) |
---|
| 4 | |
---|
| 5 | AC_CANONICAL_TARGET |
---|
| 6 | |
---|
| 7 | # New syntax; PACKAGE gets defined as 'OGRE' not 'ogre' |
---|
| 8 | #AM_INIT_AUTOMAKE([OGRE], 1.4.5) |
---|
| 9 | AM_INIT_AUTOMAKE([OGRE], 1.4.5) |
---|
| 10 | AC_CONFIG_HEADERS([OgreMain/include/config.h]) |
---|
| 11 | |
---|
| 12 | dnl Check for programs |
---|
| 13 | AC_PROG_CC |
---|
| 14 | AC_PROG_CXX |
---|
| 15 | AM_PROG_CC_C_O |
---|
| 16 | AC_PROG_INSTALL |
---|
| 17 | AC_PROG_YACC |
---|
| 18 | AM_PROG_LEX |
---|
| 19 | |
---|
| 20 | dnl Setup target-specific parameters |
---|
| 21 | OGRE_SETUP_FOR_TARGET |
---|
| 22 | |
---|
| 23 | AC_DISABLE_STATIC |
---|
| 24 | AC_PROG_LIBTOOL |
---|
| 25 | AC_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. |
---|
| 30 | AC_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 |
---|
| 34 | AC_LANG_PUSH(C++) |
---|
| 35 | AC_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 | ]) |
---|
| 61 | AC_SUBST(CFLAGS_VISIBILITY) |
---|
| 62 | AC_LANG_POP |
---|
| 63 | |
---|
| 64 | dnl Other stuff we need |
---|
| 65 | OGRE_USE_STLPORT |
---|
| 66 | AC_CHECK_FT2(9.0.0) |
---|
| 67 | |
---|
| 68 | AC_CHECK_LIB(dl, dlopen) |
---|
| 69 | AC_CHECK_LIB(m, pow) |
---|
| 70 | AC_CHECK_LIB(z, gzopen) |
---|
| 71 | AC_CHECK_LIB(pthread, pthread_create) |
---|
| 72 | AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF,,snprintf)) |
---|
| 73 | AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF,,vsnprintf)) |
---|
| 74 | |
---|
| 75 | OGRE_CHECK_CPPUNIT |
---|
| 76 | |
---|
| 77 | PKG_CHECK_MODULES(ZZIPLIB, zziplib) |
---|
| 78 | AC_SUBST(ZZIPLIB_CFLAGS) |
---|
| 79 | AC_SUBST(ZZIPLIB_LIBS) |
---|
| 80 | |
---|
| 81 | dnl Get the GL and Platform libs for target build |
---|
| 82 | OGRE_GET_PLATFORM |
---|
| 83 | OGRE_GET_GLSUPPORT |
---|
| 84 | |
---|
| 85 | dnl Find the optional components we should build |
---|
| 86 | OGRE_CHECK_GUI |
---|
| 87 | OGRE_CHECK_DOUBLE |
---|
| 88 | OGRE_CHECK_THREADING |
---|
| 89 | OGRE_CHECK_FREEIMAGE |
---|
| 90 | OGRE_CHECK_DEVIL |
---|
| 91 | OGRE_CHECK_CG |
---|
| 92 | OGRE_CHECK_OPENEXR |
---|
| 93 | OGRE_CHECK_DX9 |
---|
| 94 | OGRE_CHECK_SSE |
---|
| 95 | |
---|
| 96 | dnl Check to see if Ogre platform and GUI are the same |
---|
| 97 | dnl Fixes problem running make distclean when both are set to GLX |
---|
| 98 | OGRE_PLATFORM_AND_GUI |
---|
| 99 | |
---|
| 100 | dnl Check to see if user wants to disable building of demos (defaults is to build) - also checks for OIS |
---|
| 101 | OGRE_BUILD_DEMOS |
---|
| 102 | |
---|
| 103 | dnl Detect endianness |
---|
| 104 | OGRE_DETECT_ENDIAN |
---|
| 105 | |
---|
| 106 | dnl Check to see if -fPIC is required. |
---|
| 107 | OGRE_CHECK_PIC |
---|
| 108 | |
---|
| 109 | dnl Check to see if CEGUI is installed. |
---|
| 110 | OGRE_CHECK_CEGUI |
---|
| 111 | |
---|
| 112 | CFLAGS="$CFLAGS" |
---|
| 113 | CXXFLAGS="$CXXFLAGS" |
---|
| 114 | LIBS="$LIBS" |
---|
| 115 | |
---|
| 116 | dnl Define samples absolute install path |
---|
| 117 | ogreexecdir='${abs_top_builddir}/Samples/Common/bin' |
---|
| 118 | AC_SUBST(abs_top_builddir) |
---|
| 119 | AC_SUBST(ogreexecdir) |
---|
| 120 | |
---|
| 121 | dnl Create the makefiles |
---|
| 122 | AC_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 | |
---|
| 254 | AC_OUTPUT |
---|
| 255 | |
---|
| 256 | dnl Provide a nice final configuration status display |
---|
| 257 | |
---|
| 258 | ft_detected=yes |
---|
| 259 | test "x$no_ft" == "xyes" && ft_detected=no |
---|
| 260 | |
---|
| 261 | echo "--------===[ Configuration summary ]===--------" |
---|
| 262 | echo " Target platform : $OGRE_PLATFORM" |
---|
| 263 | echo " OpenGL Ogre support : $OGRE_GLSUPPORT" |
---|
| 264 | echo " GUI library to use : $with_gui" |
---|
| 265 | echo " Use double precision arithmetic : $build_double" |
---|
| 266 | echo " Support for threading : $build_threads" |
---|
| 267 | echo " Use STLport : $ac_cv_use_stlport" |
---|
| 268 | echo " Use FreeType : $ft_detected" |
---|
| 269 | echo " Use FreeImage : $build_freeimage" |
---|
| 270 | echo " Use DevIL : $build_il" |
---|
| 271 | echo " Build OGRE demos : $build_ogre_demos" |
---|
| 272 | test "x$build_ogre_demos" == "xyes" && \ |
---|
| 273 | echo " Build CEGUI demos : $build_cegui_sample" |
---|
| 274 | echo " Build the OpenEXR plugin : $build_exr" |
---|
| 275 | echo " Build the Cg plugin : $build_cg" |
---|
| 276 | echo " Build the DirectX 9 plugin : $build_dx9" |
---|
| 277 | echo "--------===============================--------" |
---|