~ubuntu-branches/debian/sid/ember/sid

« back to all changes in this revision

Viewing changes to .pc/0015-verbose-configure-errors.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Olek Wojnar, Stephen M. Webb, Olek Wojnar
  • Date: 2016-08-06 18:39:19 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20160806183919-4g72j3flj7xe2stj
Tags: 0.7.2+dfsg-1
[ Stephen M. Webb ]
* debian/control: updated build-depends to newer minimum versions
  (closes: #704786)
* debian/control: updated Standards-Version to 3.9.4 (updated VCS-* fields)
* debian/patches/0001-ember.in-test-expr.patch: removed (fixed upstream)
* debian/patches/0002-add-update_lua_bindings.patch: removed (fixed upstream)
* debian/patches/0003-add-atlas-pkg.patch: removed (fixed upstream)
* debian/patches/0004-domain-bindings-lua-makefile.patch: refreshed
* debian/patches/0005-ember.in-prefix.patch: removed (fixed upstream)
* debian/patches/0006-spellcheck-similiar.patch: removed (fixed upstream)
* debian/patches/0007-revert-libwfut-version.patch: refreshed
* debian/patches/0008-replace-fastdeletegate-with-sigc++.patch: removed
 (fixed upstream)
* debian/patches/0009-spelling-bach.patch: removed (fixed upstream)
* debian/patches/0010-fix-ember-script-args.patch: removed (fixed upstream)
* debian/patches/0011-qualify-template-functions.patch: removed (fixed
  upstream)
* debian/patches/0012-fix-osdir-headers.patch: removed (fixed upstream)
* debian/patches/0013-remove-invalid-linker-flags.patch: removed (fixed
  upstream)
* debian/patches/0014-add-missing-ogrelodstrategy.patch: new
* debian/control: fixed Vcs-Browser URL
* debian/patches/0015-verbose-configure-errors.patch: new
* debian/patches/0016-boost-1.53.patch: new
* debian/control: bump boost build dependeny to 1.53

[ Olek Wojnar ]
* New upstream release (Closes: #799748)
* Add myself as new uploader
  - Remove Stephen Webb per his request
  - Thanks for all the contributions, Stephen!
* d/patches/0007-revert-libwfut-version.patch: removed (unnecessary)
* d/control
  - Remove pre-dependency on dpkg
  - Update standards to 3.9.8 (no changes)
  - Update Vcs lines for secure URIs
* Import patch from the wfmath package to replace MersenneTwister.h
  -- Avoids problems from ambiguous copyright of the original file
* Update dependencies for version 0.7.2
* Enable all hardening options
* Add three lintian overrides
  -- Ignore install into usr/bin (binary)
  -- Ignore .rc files needed for WIN32 build (source)
  -- Ignore false positive of spelling error (binary)
* d/copyright: Update contributors and dates
* d/rules
  -- Do not remove "sounddefinitions" directory
  -- Enable parallel build
  -- Do not install into games directories
  -- Remove dh_builddeb override since xz is now the default
* d/watch: update file extensions
* Remove three patches, add eight patches, update remaining patches
  -- 0004-domain-bindings-lua-makefile.patch (implemented upstream)
  -- 0014-add-missing-ogrelodstrategy.patch (implemented upstream)
  -- 0016-boost-1.53.patch (patch target file removed upstream)
  -- 0018-enable-subdir-objects.patch (Fix automake 1.14 warnings)
  -- 0019-update-boost-m4.patch (Fix invalid boost_major_version)
  -- 0020-remove-obsolete-includes.patch (Fix obsolete includes)
  -- 0021-GraphicalChangeAdapter-fix-for-newer-compilers.patch (Added)
  -- 0022-fix-typos.patch (Fix typos identified by lintian)
  -- 0023-add-keywords-to-desktop-file.patch (Add Keywords to .desktop file)
  -- 0024-fix-icon-location (Make icon location Icon Theme Spec-compliant)
  -- 0025-fix-duplicate-script-install.patch (Was causing build failures)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Process this file with autoconf to produce a configure script.
 
2
AC_INIT([Ember],[0.7.2],[erik@ogenvik.org])
 
3
 
 
4
AC_CONFIG_MACRO_DIR([m4])
 
5
 
 
6
AC_CONFIG_SRCDIR(src)
 
7
 
 
8
# Detect the canonical host and target build environment.
 
9
AC_CANONICAL_TARGET
 
10
 
 
11
# We have to use "foreign" since we supply README.md instead of the GNU canonical README file.
 
12
AM_INIT_AUTOMAKE([tar-ustar nostdinc dist-bzip2 color-tests parallel-tests foreign])
 
13
AM_SILENT_RULES([yes])
 
14
 
 
15
 
 
16
AC_CONFIG_HEADERS([src/config.h])
 
17
 
 
18
AC_PREREQ([2.50])
 
19
AC_COPYRIGHT([This script is under the GPL and is owned by the people in AUTHORS])
 
20
 
 
21
#will disable verbose linking checks, which fail even if there is no problem.
 
22
lt_cv_deplibs_check_method=pass_all
 
23
LT_INIT
 
24
 
 
25
 
 
26
# Checks for Programs
 
27
AC_PROG_CXX
 
28
AC_PROG_CC
 
29
AC_PROG_OBJC
 
30
AC_PROG_LIBTOOL
 
31
 
 
32
AC_PATH_PROG([XMLLINT], [xmllint], [true])
 
33
 
 
34
# Check for C libraries:
 
35
AC_LANG([C++])
 
36
AC_REQUIRE_CPP
 
37
AX_CXX_COMPILE_STDCXX_11
 
38
 
 
39
 
 
40
AC_LANG_PUSH([C])
 
41
 
 
42
# Checks for header files.
 
43
AC_HEADER_STDC
 
44
AC_CHECK_HEADER(stdlib.h)
 
45
AC_CHECK_HEADER(math.h)
 
46
AC_CHECK_HEADER([signal.h])
 
47
 
 
48
# Checks for typedefs, structures, and compiler characteristics.
 
49
AC_C_CONST
 
50
AC_C_INLINE
 
51
AC_STRUCT_TM
 
52
 
 
53
# check sighandler_t in C++
 
54
AC_LANG_PUSH([C++])
 
55
AC_CHECK_TYPES([sighandler_t],[],[],[
 
56
#ifdef HAVE_SIGNAL_H
 
57
# include <signal.h>
 
58
#endif])
 
59
AC_LANG_POP([C++])
 
60
 
 
61
# Checks for library functions.
 
62
AC_FUNC_ERROR_AT_LINE
 
63
AC_FUNC_MALLOC
 
64
AC_FUNC_VPRINTF
 
65
AC_CHECK_FUNCS([memset select])
 
66
 
 
67
#taken from Sear
 
68
STATIC_LIBSTDCPP=
 
69
STATIC_LIBGCC=
 
70
 
 
71
AC_ARG_ENABLE(static_build,
 
72
  [AS_HELP_STRING([--enable-static-build],[enable static link of some libs (default=no)])],
 
73
  [
 
74
    if test "$enableval" = "yes"; then
 
75
      link_static="true"
 
76
      STATIC_LIBSTDCPP=`$CXX -print-file-name=libstdc++.a`
 
77
      STATIC_LIBGCC=`$CXX -print-file-name=libgcc.a`
 
78
    else
 
79
      link_static="false"
 
80
    fi
 
81
  ],[
 
82
    link_static="false"
 
83
  ]
 
84
)
 
85
AM_CONDITIONAL([BUILD_STATIC], [test x"$link_static" = xtrue])
 
86
 
 
87
AC_MSG_RESULT([
 
88
 
 
89
                **************************************
 
90
                * Checking for SDL Libraries
 
91
                **************************************
 
92
 
 
93
        ])
 
94
        
 
95
AM_PATH_SDL([1.2.0],,
 
96
[
 
97
  AC_MSG_ERROR(Couldn't find SDL or insufficent version found. Please goto http://www.libsdl.org/ and get at least version $SDL_VERSION)
 
98
])
 
99
 
 
100
#dnl don't add SDL flags yet, SDL_main confuses later checks
 
101
 
 
102
#We check for OpenGL only because we want to check whether indirect rendering is used or not. If the code is altered to not having to check with OpenGL direct (for example going through Ogre) this check can be removed. 
 
103
WF_CHECK_GL_SINGLE_LIB
 
104
 
 
105
# OpenAL check
 
106
AC_MSG_RESULT([
 
107
 
 
108
                **************************************
 
109
                * Checking for C Libraries
 
110
                **************************************
 
111
 
 
112
        ])
 
113
 
 
114
WIN32="false"
 
115
OSX="false"
 
116
case $build_os in
 
117
  cygwin* | mingw* | cegcc*)
 
118
        LIBS="$LIBS -lshlwapi"
 
119
        AC_CHECK_TOOL(WINDRES, windres, "windres")
 
120
        AC_MSG_RESULT([Building for windows.])
 
121
        WIN32="true"
 
122
    ;;
 
123
  darwin*)
 
124
    AC_MSG_RESULT([Building for Mac OS X.])
 
125
        OSX="true"
 
126
    ;;
 
127
esac
 
128
 
 
129
AM_CONDITIONAL([WIN32], [test x$WIN32 = xtrue])
 
130
AM_CONDITIONAL([OSX], [test x$OSX = xtrue])
 
131
 
 
132
BOOST_REQUIRE
 
133
BOOST_THREADS
 
134
BOOST_DATE_TIME
 
135
 
 
136
LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS $BOOST_DATE_TIME_LDFLAGS"
 
137
LIBS="$LIBS $BOOST_THREAD_LIBS $BOOST_DATE_TIME_LIBS"
 
138
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
 
139
 
 
140
AC_ARG_ENABLE(webember,
 
141
  [AS_HELP_STRING([--enable-webember], [enable building of webember (default=no)])],
 
142
  [
 
143
    if test "$enableval" = "yes"; then
 
144
      webember_enabled="true"
 
145
      CXXFLAGS="$CXXFLAGS -DBUILD_WEBEMBER"
 
146
    else
 
147
      webember_enabled="false"
 
148
    fi
 
149
  ],[
 
150
    webember_enabled="false"
 
151
  ]
 
152
)
 
153
 
 
154
AM_CONDITIONAL([BUILD_WEBEMBER], [test x"$webember_enabled" = xtrue])
 
155
 
 
156
if test "$webember_enabled" = "true" -a "$WIN32" = "false" -a "$OSX" = "false"  ; then
 
157
  # needed for some autotools versions. This is needed on POSIX ELF shared libraries only.
 
158
  CXXFLAGS="$CXXFLAGS -fPIC"
 
159
        AC_LANG_PUSH([C++])
 
160
        AC_CHECK_HEADER([boost/interprocess/ipc/message_queue.hpp], [],
 
161
                [AC_MSG_ERROR(You need the Boost interprocess library.)])
 
162
        AC_LANG_POP([C++])
 
163
fi
 
164
 
 
165
 
 
166
 
 
167
# make sure binreloc funtionality is used
 
168
AM_BINRELOC
 
169
 
 
170
# Try to find system-wide installation of tinyxml
 
171
# If found, add define to config.h, set LIBS and add automake conditional
 
172
AC_CHECK_LIB(tinyxml, main,
 
173
        [
 
174
                AC_DEFINE(HAVE_LIBTINYXML, 1, [Define to 1 if you have the `tinyxml' library (-ltinyxml).])
 
175
                LIBS="-ltinyxml $LIBS"
 
176
                have_tinyxml=true
 
177
        ],
 
178
        [
 
179
                have_tinyxml=false
 
180
        ]
 
181
)
 
182
AM_CONDITIONAL(HAVE_LIBTINYXML, [test x$have_tinyxml = xtrue])
 
183
 
 
184
# Check for C++ libraries:
 
185
AC_LANG_POP([C])
 
186
 
 
187
AC_MSG_RESULT([
 
188
 
 
189
                **************************************
 
190
                * Checking for C++ Libraries
 
191
                **************************************
 
192
 
 
193
        ])
 
194
 
 
195
 
 
196
# Check for OpenAL
 
197
OPENAL_VERSION=0.0.8
 
198
PKG_CHECK_MODULES(OPENAL, openal >= $OPENAL_VERSION,
 
199
        [
 
200
                CXXFLAGS="$CXXFLAGS $OPENAL_CFLAGS"
 
201
                LIBS="$LIBS $OPENAL_LIBS"
 
202
        ],
 
203
        [
 
204
                AC_MSG_ERROR([Couldn't find OpenAL or tests failed. Error: $OPENAL_PKG_ERRORS. Please go to http://www.openal.org to get the latest, or check config.log to see why the tests failed, and fix it.])
 
205
        ])
 
206
 
 
207
#check for libogg 
 
208
#OGG_VERSION=1.1.3
 
209
#PKG_CHECK_MODULES(OGG, ogg >= $OGG_VERSION, 
 
210
#               [
 
211
#                       CXXFLAGS="$CXXFLAGS $OGG_CFLAGS"
 
212
#                       LIBS="$LIBS $OGG_LIBS"
 
213
#               ],
 
214
#               [
 
215
#                       AC_MSG_ERROR([Couldn't find libogg or tests failed. Error: $OGG_PKG_ERRORS. Please go to http://www.vorbis.com to get the latest, or check config.log to see why the tests failed, and fix it.])
 
216
#               ])
 
217
 
 
218
#check for vorbis 
 
219
#VORBIS_VERSION=1.2.0
 
220
#PKG_CHECK_MODULES(VORBIS, vorbis >= $VORBIS_VERSION, 
 
221
#               [
 
222
#                       CXXFLAGS="$CXXFLAGS $VORBIS_CFLAGS"
 
223
#                       LIBS="$LIBS $VORBIS_LIBS"
 
224
#               ],
 
225
#               [
 
226
#                       AC_MSG_ERROR([Couldn't find libvorbis or tests failed. Error: $VORBIS_PKG_ERRORS. Please go to http://www.vorbis.com to get the latest, or check config.log to see why the tests failed, and fix it.])
 
227
#               ])
 
228
 
 
229
#check for vorbisfile 
 
230
#VORBISF_VERSION=1.2.0
 
231
#PKG_CHECK_MODULES(VORBISF, vorbisfile >= $VORBISF_VERSION, 
 
232
#               [
 
233
#                       CXXFLAGS="$CXXFLAGS $VORBISF_CFLAGS"
 
234
#                       LIBS="$LIBS $VORBISF_LIBS"
 
235
#               ],
 
236
#               [
 
237
#                       AC_MSG_ERROR([Couldn't find vorbisfile tests failed. Error: $VORBISF_PKG_ERRORS. Please go to http://www.vorbis.com to get the latest, or check config.log to see why the tests failed, and fix it.])
 
238
#               ])
 
239
 
 
240
# Check for FreeALUT
 
241
FREEALUT_VERSION=1.0.0
 
242
PKG_CHECK_MODULES(FREEALUT, freealut >= $FREEALUT_VERSION,
 
243
        [
 
244
                CXXFLAGS="$CXXFLAGS $FREEALUT_CFLAGS"
 
245
                LIBS="$LIBS $FREEALUT_LIBS"
 
246
        ],
 
247
        [
 
248
                AC_MSG_ERROR([Couldn't find FreeALUT or tests failed. Error: $FREEALUT_PKG_ERRORS. Please go to http://www.openal.org to get the latest, or check config.log to see why the tests failed, and fix it.])
 
249
        ])
 
250
 
 
251
# check for sigc++ separately from the WF checks
 
252
PKG_CHECK_MODULES(SIG, [sigc++-2.0 >= 2.0],
 
253
  [
 
254
      CXXFLAGS="$CXXFLAGS $SIG_CFLAGS"
 
255
      LIBS="$LIBS $SIG_LIBS"
 
256
  ],
 
257
  [
 
258
      AC_MSG_ERROR([Couldn't find SIGC++2.0])
 
259
  ])
 
260
 
 
261
# Check for the WorldForge libs
 
262
PKG_CHECK_MODULES(WF, [eris-1.3 >= 1.3.23 \
 
263
 varconf-1.0 >= 0.6.7 mercator-0.3 >= 0.3.3 atlascpp-0.6 >= 0.6.3 wfmath-1.0 >= 1.0.0 libwfut-0.2 >= 0.2.2],
 
264
        [
 
265
                CXXFLAGS="$CXXFLAGS $WF_CFLAGS"
 
266
                LIBS="$LIBS $WF_LIBS"
 
267
        ],
 
268
 AC_MSG_ERROR([Couldn't find some of the required WorldForge libraries: $WF_PKG_ERRORS
 
269
Please visit  http://worldforge.org/dev/eng/libraries to get the latest versions.])
 
270
)
 
271
 
 
272
# Check for OGRE
 
273
OGRE_VERSION=1.9.0
 
274
OGRE_MAX_VERSION=1.9.9
 
275
PKG_CHECK_MODULES(OGRE, [OGRE >= $OGRE_VERSION OGRE < $OGRE_MAX_VERSION],
 
276
        [
 
277
                CXXFLAGS="$CXXFLAGS $OGRE_CFLAGS"
 
278
                LIBS="$LIBS $OGRE_LIBS"
 
279
                AC_DEFINE_UNQUOTED([OGRE_PLUGINDIR], "`pkg-config --variable=plugindir OGRE`", [The Ogre plugin dir])
 
280
        ],
 
281
        [
 
282
                AC_MSG_ERROR([Couldn't find OGRE or tests failed:
 
283
$OGRE_PKG_ERRORS
 
284
Please goto http://www.ogre3d.org to get the latest, or check config.log to
 
285
see why the tests failed, and fix it.])
 
286
        ])
 
287
 
 
288
# Check for OGRE Overlay Component separately
 
289
OGRE_OVERLAY_VERSION=1.9.0
 
290
PKG_CHECK_MODULES(OGRE_OVERLAY, [OGRE-Overlay >= OGRE_OVERLAY_VERSION],
 
291
    [
 
292
        CXXFLAGS="$CXXFLAGS $OGRE_OVERLAY_CFLAGS"
 
293
        LIBS="$LIBS $OGRE_OVERLAY_LIBS"
 
294
    ],
 
295
                AC_MSG_ERROR([Could not find the required OGRE Overlay component:
 
296
$OGRE_OVERLAY_PKG_ERRORS
 
297
Please goto http://www.ogre3d.org to get the full OGRE libraries, or check config.log to
 
298
see why the tests failed, and fix it.])
 
299
                  )
 
300
AC_SUBST([OGRE_OVERLAY_CFLAGS])
 
301
AC_SUBST([OGRE_OVERLAY_LIBS])
 
302
 
 
303
# Check for OGRE Terrain Component separately
 
304
OGRE_TERRAIN_VERSION=1.9.0
 
305
PKG_CHECK_MODULES(OGRE_TERRAIN, [OGRE-Terrain >= OGRE_TERRAIN_VERSION],
 
306
    [
 
307
        CXXFLAGS="$CXXFLAGS $OGRE_TERRAIN_CFLAGS"
 
308
        LIBS="$LIBS $OGRE_TERRAIN_LIBS"                                         
 
309
    ],
 
310
                AC_MSG_ERROR([Could not find the required OGRE Terrain component:
 
311
$OGRE_TERRAIN_PKG_ERRORS
 
312
Please goto http://www.ogre3d.org to get the full OGRE libraries, or check config.log to
 
313
see why the tests failed, and fix it.])
 
314
                  )
 
315
AC_SUBST([OGRE_TERRAIN_CFLAGS])
 
316
AC_SUBST([OGRE_TERRAIN_LIBS])
 
317
 
 
318
        
 
319
#Check that Ogre is built with FreeImage support. If not, no images can be loaded. Ogre can also be built with DevIL, but that's not thread safe, and will lead to crashes.
 
320
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 
321
#include <OgreBuildSettings.h>
 
322
]],
 
323
[[
 
324
#if OGRE_NO_FREEIMAGE == 0
 
325
// OGRE is built with FreeImage
 
326
#else
 
327
# OGRE is not built with FreeImage
 
328
#endif
 
329
]])],
 
330
[], [AC_MSG_ERROR([[You must build Ogre with FreeImage support. You cannot use DevIL, as that's not thread safe.]])])
 
331
 
 
332
# We need to check if Ogre is built in double precision mode, mainly in order for the Lua bindings to be correct.
 
333
REAL_TYPE=float
 
334
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 
335
#include <OgreBuildSettings.h>
 
336
]],
 
337
[[
 
338
#if OGRE_DOUBLE_PRECISION == 0
 
339
// OGRE is built with single precision
 
340
#else
 
341
# OGRE is built with double precision
 
342
#endif
 
343
]])],
 
344
[],[REAL_TYPE="double"])
 
345
 
 
346
AC_SUBST(OGRE_REAL_TYPE, $REAL_TYPE)
 
347
 
 
348
CEGUI_VERSION=0.8.3
 
349
CEGUI_PKG=CEGUI-0
 
350
PKG_CHECK_MODULES(CEGUI, $CEGUI_PKG >= $CEGUI_VERSION,
 
351
        [
 
352
                CXXFLAGS="$CXXFLAGS $CEGUI_CFLAGS"
 
353
                LIBS="$LIBS $CEGUI_LIBS"
 
354
                AC_SUBST(CEGUI_MODULEDIR, `pkg-config $CEGUI_PKG --variable=moduledir`)
 
355
        ],
 
356
        [
 
357
                AC_MSG_ERROR([Couldn't find CEGUI or tests failed:
 
358
$CEGUI_PKG_ERRORS
 
359
Please go to http://www.cegui.org.uk to get the latest, or check
 
360
config.log to see why the tests failed, and fix it.])
 
361
        ])
 
362
        
 
363
case "x$target_os" in
 
364
  *bsd* | *linux* )
 
365
        PKG_CHECK_MODULES([X11], x11,
 
366
                [
 
367
                        CXXFLAGS="$CXXFLAGS $X11_CFLAGS"
 
368
                        LIBS="$LIBS $X11_LIBS"
 
369
                ],
 
370
                [
 
371
                        AC_MSG_ERROR([Couldn't find X11 development files.
 
372
                        $X11_PKG_ERRORS])
 
373
                ])
 
374
  break;
 
375
  ;;
 
376
esac
 
377
        
 
378
 
 
379
# Check for CEGUI-OGRE adapter
 
380
PKG_CHECK_MODULES(CEGUIOGRE, [CEGUI-0-OGRE >= $CEGUI_VERSION],
 
381
        [
 
382
                CXXFLAGS="$CXXFLAGS $CEGUIOGRE_CFLAGS"
 
383
                LIBS="$LIBS $CEGUIOGRE_LIBS"
 
384
        ],
 
385
        [
 
386
                AC_MSG_ERROR([Couldn't find CEGUI-OGRE adapter. Make sure that you've compiled Ogre before compiling CEGUI, and that CEGUI found the Ogre libs so that the Ogre renderer is built.
 
387
$CEGUIOGRE_PKG_ERRORS])
 
388
        ])
 
389
 
 
390
 
 
391
#check for lua
 
392
PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1,
 
393
[
 
394
        CXXFLAGS="$CXXFLAGS $LUA_CFLAGS -DLUA51"
 
395
        LIBS="$LIBS $LUA_LIBS"
 
396
        AC_MSG_NOTICE([Lua version => 5.1, make sure that CEGUI also has been compiled for this version])
 
397
],
 
398
[
 
399
        PKG_CHECK_MODULES(LUA, lua >= 5.1,
 
400
        [
 
401
                CXXFLAGS="$CXXFLAGS $LUA_CFLAGS -DLUA51"
 
402
                LIBS="$LIBS $LUA_LIBS"
 
403
                AC_MSG_NOTICE([Lua version => 5.1, make sure that CEGUI also has been compiled for this version])
 
404
        ],
 
405
        [
 
406
                AC_MSG_ERROR([Couldn't find Lua or tests failed. Error: $LUA_PKG_ERRORS. Please go to http://www.lua.org to get the latest, or check config.log to see why the tests failed, and fix it. Also make sure that CEGUI is built with Lua support.])
 
407
        ])
 
408
])
 
409
 
 
410
 
 
411
AC_ARG_ENABLE(cegui_toluapp,
 
412
  [  AS_HELP_STRING([--enable-cegui-toluapp], [allow Ember to use the CEGUI provided tolua++ library. This requires that you've also had CEGUI build the tolua++ generator, and that generator by this build (see --with-tolua++) (default is disabled)])],
 
413
  [
 
414
    if test "$enableval" = "yes"; then
 
415
      cegui_toluapp="true"
 
416
    else
 
417
      cegui_toluapp="false"
 
418
    fi
 
419
  ],[
 
420
    cegui_toluapp="false"
 
421
  ]
 
422
)
 
423
 
 
424
# Check for tolua++
 
425
AC_CHECK_LIB([CEGUItoluapp], [main],
 
426
    [
 
427
            if test "$cegui_toluapp" = "true"; then
 
428
                LIBS="-lCEGUItoluapp $LIBS"
 
429
                AC_MSG_NOTICE([Using CEGUI provided tolua++ implementation. Make sure that you're also using the CEGUI provided tolua++ generator (see --with-toluaxx)])
 
430
            else
 
431
                AC_MSG_ERROR([A CEGUI provided tolua++ implementation was found. By default this is not allowed. The reason is that CEGUI normally doesn't build the tolua++ generator needed by Ember, and there's a risk then that Ember will use a tolua++ generator installed by the system together with the tolua++ library provided by CEGUI. This will in most cases lead to strange compilation errors.
 
432
                        You have two options:
 
433
                                1) Make sure that there's a tolua++ (http://www.codenix.com/~tolua/) development package installed on the system, and recompile CEGUI so that it recognizes and uses this (make sure to uninstall CEGUI first).
 
434
                                2) If you're certain that you've told CEGUI to also compile the tolua++ code generator and want to have Ember use the CEGUI provided tolua++ implementation, use the --enable-cegui-toluapp to disable this check. Use --with-toluaxx to make sure that the CEGUI provided tolua++ generator is used.])
 
435
            fi
 
436
    ],
 
437
    [
 
438
        AC_CHECK_LIB([tolua++], [main],
 
439
            [
 
440
                LIBS="-ltolua++ $LIBS"
 
441
            ],
 
442
            [
 
443
                #Debian based systems adds a "5.1" suffix to the library name
 
444
                        AC_CHECK_LIB([tolua++5.1], [main],
 
445
                            [
 
446
                                LIBS="-ltolua++5.1 $LIBS"
 
447
                            ],
 
448
                            [
 
449
                                AC_MSG_ERROR([Couldn't find tolua++. Make sure that tolua++ (http://www.codenix.com/~tolua/) is installed and CEGUI is compiled with Lua scripting support.])
 
450
                            ]
 
451
                        )
 
452
            ]
 
453
        )
 
454
    ]
 
455
)
 
456
 
 
457
AM_CHECK_TOLUAXX
 
458
 
 
459
# We have lua and tolua++. Now, check for CEGUI lua module
 
460
PKG_CHECK_MODULES(CEGUILUA, [CEGUI-0-LUA >= $CEGUI_VERSION],
 
461
        [
 
462
                CXXFLAGS="$CXXFLAGS $CEGUILUA_CFLAGS"
 
463
                LIBS="$LIBS $CEGUILUA_LIBS"
 
464
        ],
 
465
        [
 
466
                AC_MSG_ERROR([Couldn't find Lua CEGUI module. Make sure that CEGUI compiled with Lua scripting support.
 
467
$CEGUILUA_PKG_ERRORS])
 
468
        ])
 
469
 
 
470
# Cppunit check
 
471
 
 
472
AC_ARG_ENABLE(cppunit,[  --enable-cppunit     enables cppunit tests [default=yes]],
 
473
 
474
   if test x$enableval = xno; then 
 
475
                ac_use_cppunit="no"     
 
476
   else 
 
477
                ac_use_cppunit="yes"
 
478
   fi
 
479
], [ac_use_cppunit="yes"])
 
480
 
 
481
found_cppunit=no
 
482
 
 
483
if test "$ac_use_cppunit" = "yes"; then
 
484
        AM_PATH_CPPUNIT(1.8.0, [
 
485
          AC_MSG_RESULT([
 
486
                *** Found CppUnit
 
487
                *** Setting up make check to run tests...])
 
488
                        found_cppunit=yes
 
489
                ], 
 
490
          AC_MSG_RESULT([
 
491
                *** Unable to find a recent enough CppUnit
 
492
                *** Will not run unit testing!!
 
493
                *** 
 
494
                *** To get CppUnit see http://cppunit.sourceforge.net
 
495
                ]))
 
496
fi
 
497
 
 
498
AM_CONDITIONAL(USE_CPPUNIT, [test x$found_cppunit = xyes])
 
499
 
 
500
 
 
501
# debugging option
 
502
AC_ARG_ENABLE(debug,[  --enable-debug     creates debugging code [default=no]],
 
503
 
504
   if test x$enableval = xno; then 
 
505
                ac_use_debug_code="no"  
 
506
   else 
 
507
                ac_use_debug_code="yes"
 
508
   fi
 
509
], [ac_use_debug_code="no"])
 
510
 
 
511
if test "$ac_use_debug_code" = "yes"; then
 
512
      CFLAGS="$CFLAGS -DDEBUG"
 
513
      CXXFLAGS="$CXXFLAGS -DDEBUG"
 
514
else
 
515
      CFLAGS="$CFLAGS -DNDEBUG"
 
516
      CXXFLAGS="$CXXFLAGS -DNDEBUG"
 
517
fi
 
518
 
 
519
# gprof debugging option
 
520
AC_ARG_ENABLE(gprof,[  --enable-gprof     Add flags for gprof [default=no]],
 
521
[
 
522
   if test x$enableval = xno; then 
 
523
                ac_use_gprof_code="no"  
 
524
   else 
 
525
                ac_use_gprof_code="yes"
 
526
   fi
 
527
], [ac_use_gprof_code="no"])
 
528
 
 
529
if test "$ac_use_gprof_code" = "yes"; then
 
530
      CFLAGS="$CFLAGS -pg -g"
 
531
      CXXFLAGS="$CXXFLAGS -pg -g"
 
532
fi
 
533
 
 
534
 
 
535
 
 
536
 
 
537
 
 
538
 
 
539
#dnl add SDL flags here, now that we're done with the other tests
 
540
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
 
541
LIBS="$LIBS $SDL_LIBS"
 
542
    
 
543
 
 
544
AC_MSG_RESULT([
 
545
 
 
546
                **************************************
 
547
                * Tests Passed, Creating Makefiles.
 
548
                **************************************
 
549
 
 
550
        ])
 
551
 
 
552
AC_CONFIG_FILES([Makefile
 
553
                 src/Makefile
 
554
                 src/platform/Makefile
 
555
                 src/main/Makefile
 
556
                 src/components/Makefile
 
557
                 src/bindings/Makefile
 
558
                 src/bindings/lua/Makefile
 
559
                 src/framework/Makefile
 
560
                 src/framework/tasks/Makefile
 
561
                 src/framework/bindings/Makefile
 
562
                 src/framework/bindings/lua/Makefile
 
563
                 src/framework/bindings/lua/eris/Makefile
 
564
                 src/framework/bindings/lua/atlas/Makefile
 
565
                 src/framework/bindings/lua/varconf/Makefile
 
566
                 src/services/Makefile
 
567
                 src/services/config/Makefile
 
568
                 src/services/logging/Makefile
 
569
                 src/services/metaserver/Makefile
 
570
                 src/services/server/Makefile
 
571
                 src/services/scripting/Makefile
 
572
                 src/services/sound/Makefile
 
573
                 src/services/bindings/Makefile
 
574
                 src/services/bindings/lua/Makefile
 
575
                 src/services/wfut/Makefile
 
576
                 src/services/input/Makefile
 
577
                 src/services/serversettings/Makefile
 
578
                 ember.dox
 
579
                 ember
 
580
                 ember.conf
 
581
                 support/ember.spec
 
582
                 support/ember-media.spec
 
583
                 src/extensions/Makefile
 
584
                 src/components/lua/Makefile
 
585
                 src/components/lua/bindings/Makefile
 
586
                 src/components/lua/bindings/lua/Makefile
 
587
                 src/components/ogre/scripting/Makefile
 
588
                 src/components/ogre/scripting/bindings/Makefile
 
589
                 src/components/ogre/scripting/bindings/lua/Makefile
 
590
                 src/components/ogre/scripting/bindings/lua/ogre/Makefile
 
591
                 src/components/ogre/scripting/bindings/lua/helpers/Makefile
 
592
                 src/components/ogre/Makefile
 
593
                 src/components/ogre/widgets/Makefile
 
594
                 src/components/ogre/widgets/adapters/Makefile
 
595
                 src/components/ogre/widgets/adapters/atlas/Makefile
 
596
                 src/components/ogre/widgets/adapters/atlas/bindings/Makefile
 
597
                 src/components/ogre/widgets/adapters/atlas/bindings/lua/Makefile
 
598
                 src/components/ogre/widgets/adapters/bindings/Makefile
 
599
                 src/components/ogre/widgets/adapters/bindings/lua/Makefile
 
600
                 src/components/ogre/widgets/representations/Makefile
 
601
                 src/components/ogre/widgets/representations/bindings/Makefile
 
602
                 src/components/ogre/widgets/representations/bindings/lua/Makefile
 
603
                 src/components/ogre/environment/caelum/Makefile
 
604
                 src/components/ogre/environment/pagedgeometry/Makefile
 
605
                 src/components/ogre/environment/meshtree/Makefile
 
606
                 src/components/ogre/environment/Makefile
 
607
                 src/components/ogre/data/Makefile
 
608
                 src/components/ogre/sounddefinitions/Makefile
 
609
                 src/components/ogre/authoring/Makefile
 
610
                 src/components/ogre/authoring/entityrecipes/Makefile
 
611
                 src/components/entitymapping/Makefile
 
612
                 src/components/cegui/Makefile
 
613
                 src/components/cegui/bindings/Makefile
 
614
                 src/components/cegui/bindings/lua/Makefile
 
615
                 test/Makefile
 
616
                 src/extensions/webember/Makefile
 
617
                 src/domain/Makefile
 
618
                 src/domain/bindings/Makefile
 
619
                 src/domain/bindings/lua/Makefile
 
620
])
 
621
 
 
622
AC_OUTPUT
 
623
 
 
624
AC_MSG_RESULT([
 
625
 
 
626
                **************************************
 
627
                * Finished.  Run make to compile Ember.
 
628
                * Note that you also need to install the media. This can be gotten in a couple of different ways.
 
629
                * The easiest way is to use the rsync make target (which uses the rsync program to update the media.).
 
630
                * If you're compiling from git and want to use the development version, do:
 
631
                *
 
632
                * make devmedia
 
633
                *
 
634
                * If you're using a release version, you should however instead do:
 
635
                *
 
636
                * make releasemediarsync
 
637
                *
 
638
                * Note that both of these make targets will just fetch and install the files directly, bypassing normal "make install" producures. They should therefore not be used if you don't want to pollute your installation directory, and shouldn't be used if you install to a system directory.
 
639
                *
 
640
                * A third way is to get the media tarball directly. This only works for release versions however.
 
641
                * You can find these media tarballs at http://amber.worldforge.org/WFUT .
 
642
                * The media should be installed to PREFIX/share/ember/media
 
643
                * so that you get PREFIX/share/ember/media/user and PREFIX/share/ember/media/shared.
 
644
                * More information can be found at the Ember page at http://www.worldforge.org
 
645
                **************************************
 
646
 
 
647
        ])
 
648