25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

configure.ac 17 KiB

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