Project:
Ares Ed
Code Location:
http://ares.googlecode.com/svn/trunk//trunk
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
#---------------------------------------------------------------------------- # Autoconf input script. Invoke the ./autogen.sh script to generate a # configure script from this file. #---------------------------------------------------------------------------- AC_PREREQ([2.54]) #---------------------------------------------------------------------------- # Initialize Autoconf. #---------------------------------------------------------------------------- AC_INIT( [ares], [0.1], [jorrit.tyberghein@gmail.com]) CS_PACKAGEINFO( [The Ares Project], [Jorrit Tyberghein], []) AC_CONFIG_SRCDIR([mk/jam/build.jam]) AC_CONFIG_AUX_DIR([mk/autoconf]) AC_CANONICAL_HOST CS_PATH_INIT #---------------------------------------------------------------------------- # Setup for the configuration header. #---------------------------------------------------------------------------- AC_CONFIG_HEADERS([include/aresconfig-configure.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_BASIC CS_CHECK_COMMON_TOOLS_LINK CS_CHECK_COMMON_TOOLS_DOC_TEXINFO CS_CHECK_COMMON_TOOLS_DOC_DOXYGEN CS_CHECK_PROGS([PERL], [perl5 perl]) CS_EMIT_BUILD_PROPERTY([PERL], [$PERL]) CS_CHECK_TEMPLATE_TOOLKIT2([emit]) #---------------------------------------------------------------------------- # Determine system type #---------------------------------------------------------------------------- CS_CHECK_HOST #---------------------------------------------------------------------------- # Check for syntax problems / header files #---------------------------------------------------------------------------- # Nothing yet. #---------------------------------------------------------------------------- # Check for external libraries #---------------------------------------------------------------------------- CS_CHECK_CPPUNIT([emit]) #---------------------------------------------------------------------------- # Check for Crystal Space (CS) #---------------------------------------------------------------------------- AC_ARG_WITH([cs], [AC_HELP_STRING([--without-cs], [do not look for an installed Crystal Space SDK; this option is useful only if you need to perform routine maintenance tasks, such as generating project files or converting documentation, without having the Crystal Space SDK installed])]) AS_IF([test -z "$with_cs"], [with_cs=yes]) AS_IF([test $with_cs != no], [CS_PATH_CRYSTAL_EMIT([2.1], [], [AC_MSG_ERROR([ *** Crystal Space could not be found or was unusable. The latest version is *** always available from http://www.crystalspace3d.org/ *** Also, be sure that you have either installed Crystal Space or set the *** CRYSTAL_2_1 environment variable properly. ])], [crystalspace])]) #---------------------------------------------------------------------------- # Check if the Crystal Space static plugins lib was built. #---------------------------------------------------------------------------- AS_IF([test $with_cs != no], [AC_MSG_CHECKING([for Crystal Space static plugins]) ares_have_crystal_static=no for m in $CRYSTAL_AVAILABLE_LIBS; do AS_IF([test crystalspace_staticplugins = "$m"], [ares_have_crystal_static=yes break]) done AC_MSG_RESULT([$ares_have_crystal_static]) CS_EMIT_BUILD_PROPERTY([HAVE_CS_STATIC_PLUGINS], [$ares_have_crystal_static])]) #---------------------------------------------------------------------------- # Check for Crystal Entity Layer (CEL) #---------------------------------------------------------------------------- AC_ARG_WITH([cel], [AC_HELP_STRING([--without-cel], [do not look for an installed Crystal Entity Layer SDK; this option is useful only if you need to perform routine maintenance tasks, such as generating project files or converting documentation, without having the CEL SDK installed])]) AS_IF([test -z "$with_cel"], [with_cel=yes]) AS_IF([test $with_cel != no], [CS_PATH_CEL_EMIT([2.1], [], [AC_MSG_ERROR([ *** CEL could not be found or was unusable. The latest version is always *** available from http://cel.crystalspace3d.org/ ])], [celtool], [cel_staticplugins]) AC_DEFINE([USE_CEL], [], [Define to enable CEL.]) AC_DEFINE_UNQUOTED([CEL_PLUGIN_DIR], ["$CEL_PLUGIN_DIR"], [Define with path to CEL plugins.]) ]) #---------------------------------------------------------------------------- # Check if the CEL static plugins lib was built. #---------------------------------------------------------------------------- AS_IF([test $with_cel != no], [AC_MSG_CHECKING([for CEL static plugins]) ares_have_cel_static=no for m in $CEL_AVAILABLE_LIBS; do AS_IF([test cel_staticplugins = "$m"], [ares_have_cel_static=yes break]) done AC_MSG_RESULT([$ares_have_cel_static]) CS_EMIT_BUILD_PROPERTY([HAVE_CEL_STATIC_PLUGINS], [$ares_have_cel_static])]) #---------------------------------------------------------------------------- # Win32libs additions. #---------------------------------------------------------------------------- CS_CHECK_CSWIN32LIBS #------------------------------------------------------------------------------ # Use the CPPFLAGS, CXXFLAGS, CFLAGS, and LDFLAGS passed to configure, as well # as any additional flags provided by cs-win32libs. #------------------------------------------------------------------------------ CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [$CPPFLAGS $CFLAGS], [+]) CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS], [$CPPFLAGS $CXXFLAGS], [+]) CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [$LDFLAGS], [+]) #---------------------------------------------------------------------------- # Check for CEGUI. #---------------------------------------------------------------------------- # The check fails on some distros with missing references to libdl # (eg on OpenSUSE), so pass -ldl along as well CS_CHECK_LIB_WITH([CEGUI], [AC_LANG_PROGRAM([[#include <CEGUI.h>]], [CEGUI::WindowManager::getSingleton();])], [], [C++], [], [], [], [], [$cs_cv_libdl_libs], [CEGUIBase]) AS_IF([test $cs_cv_libCEGUI = yes], [CS_CHECK_BUILD([if CEGUI is sufficiently recent], [cs_cv_CEGUI_recent], [AC_LANG_PROGRAM( [[#include <falagard/CEGUIFalWidgetLookManager.h>]], [CEGUI::WidgetLookManager::getSingleton(); #if (CEGUI_VERSION_MAJOR == 0) && (CEGUI_VERSION_MINOR < 7) who took the ram from the ramalamadingdong? #endif ])], [], [C++], [CS_EMIT_BUILD_RESULT([cs_cv_libCEGUI], [CEGUI])], [], [], [$cs_cv_libCEGUI_cflags], [$cs_cv_libCEGUI_lflags], [$cs_cv_libCEGUI_libs])]) #------------------------------------------------------------------------------ # Check for wxWidgets. Also check if it was built with OpenGL support since it # is required by the Crystal Space wxWidgets canvas. #------------------------------------------------------------------------------ CS_CHECK_LIB_WITH([wx], [AC_LANG_PROGRAM( [[#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif ]], [[wxWindow* p = 0; int w,h; p->GetClientSize(&w,&h);]])], [], [C++]) AS_IF([test $cs_cv_libwx = yes], [AS_IF([test $cs_host_family = windows], [AC_CACHE_CHECK([if defining UNICODE is needed for WX], [cs_cv_libwx_needs_UNICODE], [CS_BUILD_IFELSE( [AC_LANG_PROGRAM( [[#include <windows.h> #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif ]], [wxString s])], [CS_CREATE_TUPLE( [$cs_cv_libwx_cflags], [$cs_cv_libwx_lflags], [$cs_cv_libwx_libs $cs_cv_libwx_gllibs]) \ CS_CREATE_TUPLE( [$cs_cv_libwx_cflags $cs_cv_libglu_cflags], [$cs_cv_libwx_lflags $cs_cv_libglu_lflags], [$cs_cv_libwx_libs $cs_cv_libglu_libs]) \ CS_CREATE_TUPLE( [$cs_cv_libwx_cflags $cs_cv_libglu_cflags], [$cs_cv_libwx_lflags $cs_cv_libglu_lflags], [$cs_cv_libwx_libs $cs_cv_libwx_gllibs $cs_cv_libglu_libs])], [C++], [cs_cv_libwx_needs_UNICODE=no], [cs_cv_libwx_cflags="$cs_cv_libwx_cflags -DUNICODE -D_UNICODE" cs_cv_libwx_needs_UNICODE=yes])])]) AS_IF([test -z "$cs_cv_libwx_opengl"], [AS_IF([test -n "$CONFIG_WX"], [cs_cv_libwx_gllibs=CS_RUN_PATH_NORMALIZE([$CONFIG_WX --gl-libs])], [cs_cv_libwx_gllibs=''])]) CS_CHECK_GLU CS_CHECK_BUILD([if wxWidgets is built with OpenGL support], [cs_cv_libwx_opengl], [AC_LANG_PROGRAM( [[#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wx/glcanvas.h" ]], [wxGLCanvas* f = new wxGLCanvas(0, wxID_ANY, wxPoint()); glVertex3f(0,0,0)])], [CS_CREATE_TUPLE( [$cs_cv_libwx_cflags], [$cs_cv_libwx_lflags], [$cs_cv_libwx_libs $cs_cv_libwx_gllibs]) \ CS_CREATE_TUPLE( [$cs_cv_libwx_cflags $cs_cv_libglu_cflags], [$cs_cv_libwx_lflags $cs_cv_libglu_lflags], [$cs_cv_libwx_libs $cs_cv_libglu_libs]) \ CS_CREATE_TUPLE( [$cs_cv_libwx_cflags $cs_cv_libglu_cflags], [$cs_cv_libwx_lflags $cs_cv_libglu_lflags], [$cs_cv_libwx_libs $cs_cv_libwx_gllibs $cs_cv_libglu_libs])], [C++])], [cs_cv_libwx_opengl=no]) CS_EMIT_BUILD_RESULT([cs_cv_libwx], [WX]) AS_IF([test $cs_cv_libwx = yes], [CS_CHECK_BUILD([if wxWidgets is built with wxAUI support], [cs_cv_libwx_aui], [AC_LANG_PROGRAM( [[#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wx/aui/aui.h" ]], [wxAuiManager mgr; wxWindow* w; mgr.SetManagedWindow(w); mgr.AddPane(w, wxAuiPaneInfo());])], [CS_CREATE_TUPLE( [$cs_cv_libwx_cflags], [$cs_cv_libwx_lflags], [$cs_cv_libwx_libs])], [C++])], [cs_cv_libwx_aui=no]) AS_IF([test $cs_cv_libwx_aui = yes], [CS_EMIT_BUILD_RESULT([cs_cv_libwx_aui], [WX.AUI])]) #------------------------------------------------------------------------------ # Determine if plugin meta-information should be embedded directly into plugin # modules or if it should exist in stand-alone .csplugin files. On Unix, # embedding is accomplished via libbfd which carries a GPL license. If your # project is compatible with GPL, then set gpl_compatible to "yes". This will # cause embedding to be enabled on Unix by default. Otherwise, set it to "no", # which will cause embedding to be disabled by default on Unix. (In any event, # the user can override the default setting with the # --enable-meta-info-embedding option.) #------------------------------------------------------------------------------ m4_define([gpl_compatible], [yes]) CS_META_INFO_EMBED([emit], gpl_compatible) AS_IF([test $enable_meta_info_embedding = yes], [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [AS_ESCAPE([$(EMBED_META.CFLAGS)])], [+]) CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [AS_ESCAPE([$(EMBED_META.LFLAGS)])], [+])]) #---------------------------------------------------------------------------- # Package configuration switches. #---------------------------------------------------------------------------- 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]) #------------------------------------------------------------------------------ # Determine whether link libraries should be static or shared. #------------------------------------------------------------------------------ CS_CHECK_BUILD_LIBS_SHARED([ARES_BUILD_SHARED_LIBS], [], [CS_DEFINE_EMITTER]) #----------------------------------------------------------------------------- # Emit install paths and package information. #----------------------------------------------------------------------------- CS_OUTPUT_INSTALLDIRS CS_EMIT_PACKAGEINFO #---------------------------------------------------------------------------- # Emit generated files. #---------------------------------------------------------------------------- CS_JAMCONFIG_OUTPUT([Jamconfig]) AC_CONFIG_FILES([Jamfile]) AC_OUTPUT AC_MSG_NOTICE([ Please note that this project uses Jam as its build tool, therefore you must type 'jam' to build the project. Jam home: http://www.perforce.com/jam/jam.html Jam source: ftp://ftp.perforce.com/jam/ ])
