1 | dnl configure script for Lol Engine |
---|
2 | |
---|
3 | AC_INIT(lolengine, 0.0) |
---|
4 | AC_PREREQ(2.50) |
---|
5 | AC_CONFIG_AUX_DIR(.auto) |
---|
6 | AC_CANONICAL_SYSTEM |
---|
7 | AM_INIT_AUTOMAKE([subdir-objects no-define tar-ustar silent-rules]) |
---|
8 | dnl AM_MAINTAINER_MODE |
---|
9 | AM_DEFAULT_VERBOSITY=0 |
---|
10 | |
---|
11 | dnl Versioning of the separate software we ship |
---|
12 | LOLUNIT_VERSION=0.1 |
---|
13 | AC_SUBST(LOLUNIT_VERSION) |
---|
14 | LOLREMEZ_VERSION=0.2 |
---|
15 | AC_SUBST(LOLREMEZ_VERSION) |
---|
16 | |
---|
17 | AC_CONFIG_HEADER(config.h) |
---|
18 | |
---|
19 | AM_PROG_CC_C_O |
---|
20 | AC_PROG_CPP |
---|
21 | AC_PROG_CXX |
---|
22 | AC_PROG_CXXCPP |
---|
23 | AC_PROG_RANLIB |
---|
24 | |
---|
25 | AC_LIBTOOL_WIN32_DLL |
---|
26 | AM_PROG_LIBTOOL |
---|
27 | AC_LIBTOOL_CXX |
---|
28 | |
---|
29 | AC_C_CONST |
---|
30 | AC_C_INLINE |
---|
31 | |
---|
32 | dnl Ensure an error is thrown if pkg-config M4 files are not found. |
---|
33 | m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) |
---|
34 | m4_pattern_forbid([^PKG_CHECK_MODULES$]) |
---|
35 | m4_pattern_forbid([^PKG_PROG_PKG_CONFIG$]) |
---|
36 | |
---|
37 | dnl Same for Lol Engine M4 files. |
---|
38 | m4_pattern_forbid([^LOL_]) |
---|
39 | |
---|
40 | |
---|
41 | dnl Do not use PKG_CONFIG_LIBDIR when cross-compiling. |
---|
42 | if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then |
---|
43 | export PKG_CONFIG_LIBDIR=/dev/null |
---|
44 | fi |
---|
45 | |
---|
46 | dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right |
---|
47 | dnl now otherwise it might be set in an obscure if statement. Same thing for |
---|
48 | dnl PKG_PROG_PKG_CONFIG which needs to be called first. |
---|
49 | AC_EGREP_CPP(yes, foo) |
---|
50 | PKG_PROG_PKG_CONFIG() |
---|
51 | |
---|
52 | |
---|
53 | dnl Check for a working implementation of sed |
---|
54 | AC_PROG_SED |
---|
55 | AC_MSG_CHECKING(for a sed that understands \t) |
---|
56 | if test "$(echo 'x\x' | "${SED}" 's/.*@<:@^x\t@:>@//')" != x; then |
---|
57 | AC_MSG_RESULT(no) |
---|
58 | AC_MSG_ERROR([[consider installing GNU sed]]) |
---|
59 | else |
---|
60 | AC_MSG_RESULT(yes) |
---|
61 | fi |
---|
62 | |
---|
63 | |
---|
64 | dnl conditional builds |
---|
65 | AC_ARG_ENABLE(debug, |
---|
66 | [ --enable-debug build debug versions of the game (default no)]) |
---|
67 | AC_ARG_ENABLE(release, |
---|
68 | [ --enable-release build final release of the game (default no)]) |
---|
69 | AC_ARG_ENABLE(experimental, |
---|
70 | [ --enable-experimental experimental build (default no)]) |
---|
71 | AC_ARG_ENABLE(doc, |
---|
72 | [ --enable-doc build documentation (needs doxygen and LaTeX)]) |
---|
73 | |
---|
74 | |
---|
75 | dnl Common C headers |
---|
76 | AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h) |
---|
77 | AC_CHECK_HEADERS(fastmath.h pthread.h libutil.h util.h pty.h glob.h unistd.h) |
---|
78 | AC_CHECK_HEADERS(execinfo.h) |
---|
79 | AC_CHECK_HEADERS(sys/ioctl.h sys/ptrace.h sys/stat.h sys/syscall.h sys/user.h) |
---|
80 | AC_CHECK_HEADERS(sys/wait.h) |
---|
81 | AC_CHECK_HEADERS(linux/kdev_t.h linux/major.h) |
---|
82 | AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h) |
---|
83 | AC_CHECK_HEADERS(pam/pam_appl.h pam/pam_misc.h) |
---|
84 | |
---|
85 | dnl Common C++ headers |
---|
86 | AC_LANG_PUSH(C++) |
---|
87 | AC_CHECK_HEADERS(cxxabi.h) |
---|
88 | AC_LANG_POP(C++) |
---|
89 | |
---|
90 | dnl Common C functions |
---|
91 | AC_CHECK_FUNCS(getcwd _getcwd backtrace_symbols) |
---|
92 | |
---|
93 | |
---|
94 | if test "${enable_debug}" = "yes"; then |
---|
95 | AC_DEFINE(LOL_DEBUG, 1, Define to 1 to activate debug) |
---|
96 | OPT_CXXFLAGS="-O" |
---|
97 | else |
---|
98 | OPT_CXXFLAGS="-O3 -ffast-math -fomit-frame-pointer" |
---|
99 | OPT_LDFLAGS="-fno-strength-reduce" |
---|
100 | fi |
---|
101 | |
---|
102 | if test "${enable_release}" = "yes"; then |
---|
103 | AC_DEFINE(LOL_RELEASE, 1, Define to 1 to activate final release) |
---|
104 | REL_CXXFLAGS="" |
---|
105 | else |
---|
106 | REL_CXXFLAGS="-g" |
---|
107 | fi |
---|
108 | |
---|
109 | if test "${enable_experimental}" = "yes"; then |
---|
110 | AC_DEFINE(LOL_EXPERIMENTAL, 1, Define to 1 to activate experimental build) |
---|
111 | fi |
---|
112 | |
---|
113 | # Build documentation? |
---|
114 | DOXYGEN="no" |
---|
115 | LATEX="no" |
---|
116 | if test "${enable_doc}" != "no"; then |
---|
117 | AC_PATH_PROG(DOXYGEN, doxygen, no) |
---|
118 | if test "${DOXYGEN}" != "no"; then |
---|
119 | # Build LaTeX documentation? |
---|
120 | AC_PATH_PROG(LATEX, pdflatex, no) |
---|
121 | AC_PATH_PROG(KPSEWHICH, kpsewhich, no) |
---|
122 | AC_PATH_PROG(DVIPS, dvips, no) |
---|
123 | if test "${DVIPS}" = "no" -o "${KPSEWHICH}" = "no"; then |
---|
124 | LATEX="no" |
---|
125 | fi |
---|
126 | if test "${LATEX}" != "no"; then |
---|
127 | AC_MSG_CHECKING(for a4.sty and a4wide.sty) |
---|
128 | if "${KPSEWHICH}" a4.sty >/dev/null 2>&1; then |
---|
129 | if "${KPSEWHICH}" a4wide.sty >/dev/null 2>&1; then |
---|
130 | AC_MSG_RESULT(yes) |
---|
131 | else |
---|
132 | LATEX="no" |
---|
133 | AC_MSG_RESULT(no) |
---|
134 | fi |
---|
135 | else |
---|
136 | LATEX="no" |
---|
137 | AC_MSG_RESULT(no) |
---|
138 | fi |
---|
139 | fi |
---|
140 | AC_PATH_PROG(DOT, dot, no) |
---|
141 | if test "${DOT}" != "no"; then |
---|
142 | USE_DOT="YES" |
---|
143 | else |
---|
144 | USE_DOT="NO" |
---|
145 | fi |
---|
146 | fi |
---|
147 | fi |
---|
148 | AM_CONDITIONAL(BUILD_DOCUMENTATION, test "${DOXYGEN}" != "no") |
---|
149 | AM_CONDITIONAL(USE_LATEX, test "${LATEX}" != "no") |
---|
150 | AM_CONDITIONAL(USE_DOT, test "${DOT}" != "no") |
---|
151 | |
---|
152 | |
---|
153 | dnl No exceptions |
---|
154 | LOL_TRY_CXXFLAGS(-fno-exceptions, [AM_CXXFLAGS="${AM_CXXFLAGS} -fno-exceptions"]) |
---|
155 | LOL_TRY_CXXFLAGS(-fno-rtti, [AM_CXXFLAGS="${AM_CXXFLAGS} -fno-rtti"]) |
---|
156 | |
---|
157 | dnl Optimizations |
---|
158 | AM_CXXFLAGS="${AM_CXXFLAGS} ${REL_CXXFLAGS} ${OPT_CXXFLAGS}" |
---|
159 | AM_LDFLAGS="${AM_LDFLAGS} ${REL_LDFLAGS} ${OPT_LDFLAGS}" |
---|
160 | |
---|
161 | dnl Debug symbols |
---|
162 | LOL_TRY_LDFLAGS(-rdynamic, [AM_LDFLAGS="${AM_LDFLAGS} -rdynamic"]) |
---|
163 | |
---|
164 | dnl Code qui fait des warnings == code de porc == deux baffes dans ta gueule |
---|
165 | LOL_TRY_CXXFLAGS(-Wall, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wall"]) |
---|
166 | LOL_TRY_CXXFLAGS(-Wextra, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wextra"]) |
---|
167 | LOL_TRY_CXXFLAGS(-Wpointer-arith, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wpointer-arith"]) |
---|
168 | LOL_TRY_CXXFLAGS(-Wcast-align, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wcast-align"]) |
---|
169 | LOL_TRY_CXXFLAGS(-Wcast-qual, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wcast-qual"]) |
---|
170 | LOL_TRY_CXXFLAGS(-Wshadow, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wshadow"]) |
---|
171 | LOL_TRY_CXXFLAGS(-Wsign-compare, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wsign-compare"]) |
---|
172 | |
---|
173 | dnl Add these even though they're implicitly set, so that we can safely |
---|
174 | dnl remove them from within a Makefile. |
---|
175 | LOL_TRY_CXXFLAGS(-Wmaybe-uninitialized, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wmaybe-uninitialized"]) |
---|
176 | LOL_TRY_CXXFLAGS(-Wnarrowing, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wnarrowing"]) |
---|
177 | LOL_TRY_CXXFLAGS(-Wunused, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wunused"]) |
---|
178 | LOL_TRY_CXXFLAGS(-Wstrict-aliasing, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wstrict-aliasing"]) |
---|
179 | LOL_TRY_CXXFLAGS(-Wparentheses, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wparentheses"]) |
---|
180 | LOL_TRY_CXXFLAGS(-Wreorder, [AM_CXXFLAGS="${AM_CXXFLAGS} -Wreorder"]) |
---|
181 | |
---|
182 | |
---|
183 | AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm") |
---|
184 | AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread") |
---|
185 | |
---|
186 | |
---|
187 | dnl Unix-specific libutil |
---|
188 | AC_CHECK_LIB(util, forkpty, |
---|
189 | [UTIL_LIBS="${UTIL_LIBS} -lutil" |
---|
190 | dnl Override future forkpty detection |
---|
191 | ac_cv_func_forkpty="yes"]) |
---|
192 | AC_CHECK_FUNCS(forkpty) |
---|
193 | |
---|
194 | |
---|
195 | dnl GCC-specific symbol demangling |
---|
196 | AC_LANG_PUSH(C++) |
---|
197 | AC_TRY_LINK( |
---|
198 | [#include <cxxabi.h>], |
---|
199 | [abi::__cxa_demangle(NULL, 0, 0, NULL);], |
---|
200 | [AC_DEFINE(HAVE_CXA_DEMANGLE, 1, Define to 1 if abi::__cxa_demangle is available)]) |
---|
201 | AC_LANG_POP(C++) |
---|
202 | |
---|
203 | |
---|
204 | dnl Are we on the PS3? |
---|
205 | ac_cv_my_have_ps3="no" |
---|
206 | AC_CHECK_LIB(sysmodule_stub, cellSysmoduleLoadModule, |
---|
207 | [ac_cv_my_have_ps3="yes" |
---|
208 | LOL_LIBS="${LOL_LIBS} -lsysmodule_stub -lsysutil_stub -lresc_stub" |
---|
209 | dnl For PSGL |
---|
210 | AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) # FIXME: hack |
---|
211 | GL_LIBS="${GL_LIBS} -lPSGL -lgcm_cmd -lgcm_sys_stub" |
---|
212 | dnl This is the old way; we now use CELL_SDK instead of CELLSDK |
---|
213 | if test "x${CELLSDK}" != x -a "x${CELL_SDK}" = x; then |
---|
214 | CELL_SDK="${CELLSDK}" |
---|
215 | fi |
---|
216 | if test "x${enable_debug}" = xyes; then |
---|
217 | GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/debug" |
---|
218 | elif test "x${enable_release}" = xyes; then |
---|
219 | GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/ultra-opt" |
---|
220 | else |
---|
221 | GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/opt" |
---|
222 | fi |
---|
223 | dnl For the runtime Cg compiler |
---|
224 | GL_LIBS="${GL_LIBS} -lcgc -lPSGLcgc" |
---|
225 | dnl For the PNG decoder |
---|
226 | LOL_LIBS="${LOL_LIBS} -lpngdec_stub" |
---|
227 | dnl For the pad library |
---|
228 | LOL_LIBS="${LOL_LIBS} -lio_stub -lusbd_stub -lpadfilter" |
---|
229 | dnl Disable this warning, it's too verbose with vector.h |
---|
230 | AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-sign-compare" |
---|
231 | AC_PATH_PROG(MAKE_FSELF, make_fself, no) |
---|
232 | if test "${MAKE_FSELF}" = "no"; then |
---|
233 | AC_MSG_ERROR([[Building for PS3 but make_fself not found]]) |
---|
234 | fi], |
---|
235 | [MAKE_FSELF=no]) |
---|
236 | AM_CONDITIONAL(USE_PS3, test "${ac_cv_my_have_ps3}" != "no") |
---|
237 | |
---|
238 | |
---|
239 | dnl Are we building using MinGW? |
---|
240 | LOL_TRY_CXXFLAGS(-mwindows -mwin32, |
---|
241 | [AM_CXXFLAGS="${AM_CXXFLAGS} -mwindows -mwin32" |
---|
242 | LOL_LIBS="${LOL_LIBS} -uWinMain -u_WinMain@16"]) |
---|
243 | |
---|
244 | |
---|
245 | dnl Are we on the Xbox 360? |
---|
246 | dnl Answer: NO! we don't know how to build for it anyway |
---|
247 | AM_CONDITIONAL(USE_X360, false) |
---|
248 | |
---|
249 | |
---|
250 | dnl Are we on an OS X or iOS platform? |
---|
251 | LOL_TRY_LDFLAGS(-framework Foundation, |
---|
252 | [LOL_LIBS="${LOL_LIBS} -framework Foundation"]) |
---|
253 | LOL_TRY_LDFLAGS(-framework CoreGraphics, |
---|
254 | [LOL_LIBS="${LOL_LIBS} -framework CoreGraphics"]) |
---|
255 | LOL_TRY_LDFLAGS(-framework CoreData, |
---|
256 | [LOL_LIBS="${LOL_LIBS} -framework CoreData"]) |
---|
257 | LOL_TRY_LDFLAGS(-framework UIKit, |
---|
258 | [LOL_LIBS="${LOL_LIBS} -framework UIKit"]) |
---|
259 | |
---|
260 | |
---|
261 | dnl Are we on a Direct3D 9 platform? |
---|
262 | #ac_cv_my_have_d3d9="no" |
---|
263 | #AC_CHECK_HEADERS(d3d9.h, [ac_cv_my_have_d3d9="yes"]) |
---|
264 | #if test "${ac_cv_my_have_d3d9}" != "no"; then |
---|
265 | # D3D_LIBS="${D3D_LIBS} -ld3d9 -ld3dx9 -lxinput" |
---|
266 | # AC_DEFINE(USE_D3D9, 1, Define to 1 to use DirectX 9) |
---|
267 | #fi |
---|
268 | #AM_CONDITIONAL(USE_D3D9, test "${ac_cv_my_have_d3d9}" != "no") |
---|
269 | |
---|
270 | LOL_CHECK_OPENGL |
---|
271 | |
---|
272 | LOL_CHECK_SDL |
---|
273 | |
---|
274 | dnl Use Flex's FlexLexer.h or ours? |
---|
275 | ac_cv_my_have_flexlexer_h="no" |
---|
276 | AC_LANG_PUSH(C++) |
---|
277 | AC_CHECK_HEADERS(FlexLexer.h, |
---|
278 | dnl Ensure that FlexLexer::yleng is of type int, and not size_t like |
---|
279 | dnl on recent Apple systems. It would break all our existing code. |
---|
280 | [AC_MSG_CHECKING(for FlexLexer.h validity) |
---|
281 | AC_COMPILE_IFELSE( |
---|
282 | [AC_LANG_PROGRAM([#include <FlexLexer.h> |
---|
283 | class Foo : public FlexLexer |
---|
284 | { |
---|
285 | Foo() { int &test = yyleng; } |
---|
286 | }], |
---|
287 | [])], |
---|
288 | [AC_MSG_RESULT(yes) |
---|
289 | ac_cv_my_have_flexlexer_h="yes"], |
---|
290 | [AC_MSG_RESULT(no)])]) |
---|
291 | AC_LANG_POP(C++) |
---|
292 | if test "x${ac_cv_my_have_flexlexer_h}" = "xno"; then |
---|
293 | LOL_CFLAGS="$LOL_CFLAGS -I\$(top_srcdir)/external/flex-2.5.35/include" |
---|
294 | fi |
---|
295 | |
---|
296 | |
---|
297 | dnl Use NativeClient? |
---|
298 | ac_cv_my_have_nacl="no" |
---|
299 | AC_LANG_PUSH(C++) |
---|
300 | AC_CHECK_HEADERS(ppapi/cpp/instance.h, |
---|
301 | [ac_cv_my_have_nacl="yes" |
---|
302 | dnl Disable this warning, it's too verbose with vector.h |
---|
303 | AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-sign-compare"]) |
---|
304 | AC_LANG_POP(C++) |
---|
305 | AM_CONDITIONAL(USE_NACL, test "${ac_cv_my_have_nacl}" != "no") |
---|
306 | |
---|
307 | |
---|
308 | dnl Use Android? FIXME: super hacks! |
---|
309 | ac_cv_my_have_android="no" |
---|
310 | AC_CHECK_LIB(log, __android_log_vprint, |
---|
311 | [ac_cv_my_have_android="yes" |
---|
312 | LOL_LIBS="${LOL_LIBS} -llog -module"]) |
---|
313 | AM_CONDITIONAL(USE_ANDROID, test "${ac_cv_my_have_android}" != "no") |
---|
314 | |
---|
315 | |
---|
316 | dnl Use EGL? |
---|
317 | ac_cv_my_have_egl="no" |
---|
318 | PKG_CHECK_MODULES(EGL, egl, [ac_cv_my_have_egl="yes"], [:]) |
---|
319 | if test "${ac_cv_my_have_egl}" != "no"; then |
---|
320 | AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl) |
---|
321 | EGL_LIBS="${EGL_LIBS} -lX11" |
---|
322 | fi |
---|
323 | AC_CHECK_LIB(EGL, main, |
---|
324 | [ac_cv_my_have_egl="yes" |
---|
325 | AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl) |
---|
326 | EGL_LIBS="-lEGL"]) |
---|
327 | dnl Raspberry Pi is different, check for it with extra libs; also we |
---|
328 | dnl look for a different function to bypass autoconf caching |
---|
329 | AC_CHECK_LIB(EGL, eglGetDisplay, |
---|
330 | [ac_cv_my_have_egl="yes" |
---|
331 | AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl) |
---|
332 | EGL_LIBS="-lEGL -lvcos -lvchiq_arm -lbcm_host -lGLESv2"], |
---|
333 | [:], |
---|
334 | [-lvcos -lvchiq_arm -lbcm_host -lGLESv2]) |
---|
335 | AM_CONDITIONAL(USE_EGL, test "${ac_cv_my_have_egl}" != "no") |
---|
336 | |
---|
337 | |
---|
338 | dnl Use libpng? (replacement for SDL_image) |
---|
339 | ac_cv_my_have_libpng="no" |
---|
340 | PKG_CHECK_MODULES(LIBPNG, libpng, [ac_cv_my_have_libpng="yes"], [:]) |
---|
341 | if test "${ac_cv_my_have_libpng}" != "no"; then |
---|
342 | AC_DEFINE(USE_LIBPNG, 1, Define to 1 to use libpng) |
---|
343 | fi |
---|
344 | AM_CONDITIONAL(USE_LIBPNG, test "${ac_cv_my_have_libpng}" != "no") |
---|
345 | |
---|
346 | |
---|
347 | dnl Use Windows GDI+? |
---|
348 | ac_cv_my_have_gdiplus="no" |
---|
349 | AC_LANG_PUSH(C++) |
---|
350 | AC_CHECK_HEADERS(gdiplus.h, |
---|
351 | [ac_cv_my_have_gdiplus="yes" |
---|
352 | LOL_LIBS="${LOL_LIBS} -lgdiplus"], |
---|
353 | [ac_cv_my_have_gdiplus="no"], |
---|
354 | [#include <algorithm> |
---|
355 | using std::min; |
---|
356 | using std::max; |
---|
357 | #include <windows.h>]) |
---|
358 | AC_LANG_POP(C++) |
---|
359 | if test "${ac_cv_my_have_gdiplus}" != "no"; then |
---|
360 | AC_DEFINE(USE_GDIPLUS, 1, Define to 1 to use GDI+) |
---|
361 | fi |
---|
362 | AM_CONDITIONAL(USE_GDIPLUS, test "${ac_cv_my_have_gdiplus}" = "yes") |
---|
363 | |
---|
364 | |
---|
365 | dnl Use libcaca? (required for font generation) |
---|
366 | ac_cv_my_have_caca="no" |
---|
367 | PKG_CHECK_MODULES(CACA, caca >= 0.99.beta17, [ac_cv_my_have_caca="yes"], [:]) |
---|
368 | if test "${ac_cv_my_have_caca}" != "no"; then |
---|
369 | AC_DEFINE(USE_CACA, 1, Define to 1 to use libcaca) |
---|
370 | fi |
---|
371 | AM_CONDITIONAL(USE_CACA, test "${ac_cv_my_have_caca}" != "no") |
---|
372 | |
---|
373 | |
---|
374 | dnl Use libpipi? (required for video recording) |
---|
375 | ac_cv_my_have_pipi="no" |
---|
376 | PKG_CHECK_MODULES(PIPI, pipi, [ac_cv_my_have_pipi="yes"], [:]) |
---|
377 | if test "${ac_cv_my_have_pipi}" != "no"; then |
---|
378 | AC_DEFINE(USE_PIPI, 1, Define to 1 to use libpipi) |
---|
379 | LOL_CFLAGS="${LOL_CFLAGS} ${PIPI_CFLAGS}" |
---|
380 | LOL_LIBS="${LOL_LIBS} ${PIPI_LIBS}" |
---|
381 | fi |
---|
382 | AM_CONDITIONAL(USE_PIPI, test "${ac_cv_my_have_pipi}" != "no") |
---|
383 | |
---|
384 | |
---|
385 | dnl Use GTK+? (required for the deushax editor) |
---|
386 | ac_cv_my_have_gtkgl="no" |
---|
387 | PKG_CHECK_MODULES(GTK, gtk+-2.0, [ac_cv_my_have_gtkgl="yes"], [:]) |
---|
388 | PKG_CHECK_MODULES(GTKGL, gtkgl-2.0, [:], [ac_cv_my_have_gtkgl="no"]) |
---|
389 | if test "${ac_cv_my_have_gtkgl}" != "no"; then |
---|
390 | AC_DEFINE(USE_GTKGL, 1, Define to 1 to use GtkGl) |
---|
391 | fi |
---|
392 | AM_CONDITIONAL(USE_GTKGL, test "${ac_cv_my_have_gtkgl}" != "no") |
---|
393 | |
---|
394 | |
---|
395 | dnl Can we build neercs? |
---|
396 | AM_CONDITIONAL(BUILD_NEERCS, test "${ac_cv_my_have_caca}" != "no") |
---|
397 | |
---|
398 | |
---|
399 | dnl Extra libraries we may need |
---|
400 | AC_SUBST(MATH_LIBS) |
---|
401 | AC_SUBST(PAM_LIBS) |
---|
402 | AC_SUBST(UTIL_LIBS) |
---|
403 | |
---|
404 | dnl How to use the Lol Engine outside this tree |
---|
405 | LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $GL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS" |
---|
406 | LOL_LIBS="$LOL_LIBS $SDL_LIBS $GL_LIBS $EGL_LIBS $LIBPNG_LIBS $D3D_LIBS" |
---|
407 | LOL_DEPS="${LOL_DEPS} \$(top_builddir)/src/liblolcore.a" |
---|
408 | LOL_DEPS="${LOL_DEPS} \$(top_builddir)/src/bullet/liblolbullet.a" |
---|
409 | LOL_DEPS="${LOL_DEPS} \$(top_builddir)/src/lua/liblollua.a" |
---|
410 | |
---|
411 | dnl How to use the Lol Engine inside this tree |
---|
412 | AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_srcdir)/src" |
---|
413 | AM_CPPFLAGS="${AM_CPPFLAGS} -DLOL_CONFIG_SOURCESUBDIR=\\\"\$(subdir)\\\"" |
---|
414 | AM_CPPFLAGS="${AM_CPPFLAGS} ${LOL_CFLAGS}" |
---|
415 | AM_LDFLAGS="${AM_LDFLAGS} ${LOL_DEPS}" |
---|
416 | AM_LDFLAGS="${AM_LDFLAGS} ${LOL_LIBS}" |
---|
417 | |
---|
418 | dnl Extra flags |
---|
419 | AC_SUBST(LOL_CFLAGS) |
---|
420 | AC_SUBST(LOL_LIBS) |
---|
421 | AC_SUBST(LOL_DEPS) |
---|
422 | |
---|
423 | AC_SUBST(AM_CFLAGS) |
---|
424 | AC_SUBST(AM_CPPFLAGS) |
---|
425 | AC_SUBST(AM_CXXFLAGS) |
---|
426 | AC_SUBST(AM_LDFLAGS) |
---|
427 | |
---|
428 | AC_SUBST(USE_DOT) |
---|
429 | |
---|
430 | AC_CONFIG_FILES( |
---|
431 | [Makefile |
---|
432 | src/Makefile |
---|
433 | src/bullet/Makefile |
---|
434 | src/lua/Makefile |
---|
435 | src/data/Makefile |
---|
436 | src/data/font/Makefile |
---|
437 | tutorial/Makefile |
---|
438 | test/Makefile |
---|
439 | test/math/Makefile |
---|
440 | test/sandbox/Makefile |
---|
441 | test/xolotl/Makefile |
---|
442 | build/Makefile |
---|
443 | binaries/Makefile |
---|
444 | people/Makefile |
---|
445 | games/Makefile |
---|
446 | tools/Makefile |
---|
447 | tools/vimlol/Makefile |
---|
448 | tools/vslol/Makefile |
---|
449 | doc/Makefile |
---|
450 | doc/doxygen.cfg |
---|
451 | ]) |
---|
452 | AC_CONFIG_FILES( |
---|
453 | [games/monsterz/Makefile |
---|
454 | ]) |
---|
455 | AC_CONFIG_FILES( |
---|
456 | [games/deushax/Makefile |
---|
457 | games/deushax/art/Makefile |
---|
458 | games/deushax/art/test/Makefile |
---|
459 | games/deushax/gfx/Makefile |
---|
460 | games/deushax/maps/Makefile |
---|
461 | ]) |
---|
462 | AC_CONFIG_FILES( |
---|
463 | [games/mrpigeon/Makefile |
---|
464 | ]) |
---|
465 | AC_CONFIG_FILES( |
---|
466 | [games/orbital/Makefile |
---|
467 | ]) |
---|
468 | AC_CONFIG_FILES( |
---|
469 | [tools/neercs/Makefile |
---|
470 | ]) |
---|
471 | AC_CONFIG_FILES( |
---|
472 | [people/jnat/Makefile |
---|
473 | people/jnat/TestProject/Makefile |
---|
474 | people/peeweek/Makefile |
---|
475 | people/peeweek/private/Makefile |
---|
476 | people/touky/Makefile |
---|
477 | people/touky/private/Makefile |
---|
478 | people/touky/private/tactics/Makefile |
---|
479 | people/jylam/Makefile |
---|
480 | people/jylam/private/Makefile |
---|
481 | people/jylam/private/chat/Makefile |
---|
482 | ]) |
---|
483 | |
---|
484 | AC_OUTPUT |
---|
485 | |
---|