您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

501 行
15 KiB

  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. dnl Versioning of the separate software we ship
  9. LOLUNIT_VERSION=0.1
  10. AC_SUBST(LOLUNIT_VERSION)
  11. LOLREMEZ_VERSION=0.2
  12. AC_SUBST(LOLREMEZ_VERSION)
  13. AM_CONFIG_HEADER(config.h)
  14. AM_PROG_CC_C_O
  15. AC_PROG_CPP
  16. AC_PROG_CXX
  17. AC_PROG_CXXCPP
  18. AC_PROG_RANLIB
  19. AC_LIBTOOL_WIN32_DLL
  20. AM_PROG_LIBTOOL
  21. AC_LIBTOOL_CXX
  22. AC_C_CONST
  23. AC_C_INLINE
  24. dnl Ensure an error is thrown if pkg-config M4 files are not found.
  25. m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
  26. m4_pattern_forbid([^PKG_CHECK_MODULES$])
  27. m4_pattern_forbid([^PKG_PROG_PKG_CONFIG$])
  28. dnl Do not use PKG_CONFIG_LIBDIR when cross-compiling.
  29. if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then
  30. export PKG_CONFIG_LIBDIR=/dev/null
  31. fi
  32. dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
  33. dnl now otherwise it might be set in an obscure if statement. Same thing for
  34. dnl PKG_PROG_PKG_CONFIG which needs to be called first.
  35. AC_EGREP_CPP(yes, foo)
  36. PKG_PROG_PKG_CONFIG()
  37. AM_CONDITIONAL(USE_GLEW, test "${ac_cv_my_have_glew}" != "no")
  38. dnl conditional builds
  39. AC_ARG_ENABLE(debug,
  40. [ --enable-debug build debug versions of the game (default no)])
  41. AC_ARG_ENABLE(release,
  42. [ --enable-release build final release of the game (default no)])
  43. AC_ARG_ENABLE(experimental,
  44. [ --enable-experimental experimental build (default no)])
  45. AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h)
  46. AC_CHECK_HEADERS(fastmath.h pthread.h libutil.h util.h pty.h glob.h)
  47. AC_CHECK_HEADERS(sys/ioctl.h sys/ptrace.h sys/stat.h sys/syscall.h sys/user.h)
  48. AC_CHECK_HEADERS(sys/wait.h)
  49. AC_CHECK_HEADERS(linux/kdev_t.h linux/major.h)
  50. AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h)
  51. AC_CHECK_HEADERS(pam/pam_appl.h pam/pam_misc.h)
  52. if test "${enable_debug}" = "yes"; then
  53. AC_DEFINE(LOL_DEBUG, 1, Define to 1 to activate debug)
  54. OPT="-O"
  55. else
  56. OPT="-O3 -ffast-math -fno-strength-reduce -fomit-frame-pointer"
  57. fi
  58. if test "${enable_release}" = "yes"; then
  59. AC_DEFINE(LOL_RELEASE, 1, Define to 1 to activate final release)
  60. REL=""
  61. else
  62. REL="-g"
  63. fi
  64. if test "${enable_experimental}" = "yes"; then
  65. AC_DEFINE(LOL_EXPERIMENTAL, 1, Define to 1 to activate experimental build)
  66. fi
  67. dnl No exceptions
  68. CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti"
  69. dnl Optimizations
  70. CXXFLAGS="${CXXFLAGS} ${REL} ${OPT}"
  71. dnl Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  72. CXXFLAGS="${CXXFLAGS} -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare"
  73. AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
  74. AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
  75. AC_CHECK_LIB(util, forkpty, UTIL_LIBS="${UTIL_LIBS} -lutil")
  76. dnl Are we on the PS3?
  77. ac_cv_my_have_ps3="no"
  78. AC_CHECK_LIB(sysmodule_stub, cellSysmoduleLoadModule,
  79. [ac_cv_my_have_ps3="yes"
  80. LOL_LIBS="${LOL_LIBS} -lsysmodule_stub -lsysutil_stub -lresc_stub"
  81. dnl For PSGL
  82. AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) # FIXME: hack
  83. GL_LIBS="${GL_LIBS} -lPSGL -lgcm_cmd -lgcm_sys_stub"
  84. dnl This is the old way
  85. if test "x${CELLSDK}" != x -a "x${CELLSDK}" = x; then
  86. CELL_SDK="${CELLSDK}"
  87. fi
  88. if test "x${enable_debug}" = xyes; then
  89. GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/debug"
  90. elif test "x${enable_release}" = xyes; then
  91. GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/ultra-opt"
  92. else
  93. GL_LIBS="${GL_LIBS} -L${CELL_SDK}/target/ppu/lib/PSGL/RSX/opt"
  94. fi
  95. dnl For the runtime Cg compiler
  96. GL_LIBS="${GL_LIBS} -lcgc -lPSGLcgc"
  97. dnl For the PNG decoder
  98. LOL_LIBS="${LOL_LIBS} -lpngdec_stub"
  99. dnl For the pad library
  100. LOL_LIBS="${LOL_LIBS} -lio_stub -lusbd_stub -lpadfilter"
  101. dnl Disable this warning, it's too verbose with vector.h
  102. CXXFLAGS="${CXXFLAGS} -Wno-sign-compare"
  103. AC_PATH_PROG(MAKE_FSELF, make_fself, no)],
  104. [MAKE_FSELF=no])
  105. AM_CONDITIONAL(USE_MAKE_FSELF, test "${MAKE_FSELF}" != "no")
  106. AM_CONDITIONAL(USE_PS3, test "${ac_cv_my_have_ps3}" != "no")
  107. dnl Are we building using MinGW?
  108. LIBS_save="$LIBS"
  109. LIBS="$LIBS -mwindows -mwin32"
  110. AC_MSG_CHECKING(for -mwindows -mwin32)
  111. AC_TRY_LINK([], [],
  112. [AC_MSG_RESULT(yes)
  113. CXXFLAGS="${CXXFLAGS} -mwindows -mwin32"
  114. LOL_LIBS="${LOL_LIBS} -uWinMain -u_WinMain@16"],
  115. [AC_MSG_RESULT(no)])
  116. LIBS="$LIBS_save"
  117. dnl Are we on the Xbox 360?
  118. dnl Answer: NO! we don't know how to build for it anyway
  119. AM_CONDITIONAL(USE_X360, false)
  120. dnl Are we on a Direct3D 9 platform?
  121. #ac_cv_my_have_d3d9="no"
  122. #AC_CHECK_HEADERS(d3d9.h, [ac_cv_my_have_d3d9="yes"])
  123. #if test "${ac_cv_my_have_d3d9}" != "no"; then
  124. # D3D_LIBS="${D3D_LIBS} -ld3d9 -ld3dx9 -lxinput"
  125. # AC_DEFINE(USE_D3D9, 1, Define to 1 to use DirectX 9)
  126. #fi
  127. #AM_CONDITIONAL(USE_D3D9, test "${ac_cv_my_have_d3d9}" != "no")
  128. dnl Find which version of OpenGL to use
  129. ac_cv_my_have_gl="no"
  130. ac_cv_my_stop_looking_for_gl="no"
  131. if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
  132. LIBS_save="$LIBS"
  133. LIBS="$LIBS -Wl,-framework -Wl,OpenGL"
  134. AC_MSG_CHECKING(for -framework OpenGL)
  135. AC_TRY_LINK([], [],
  136. [AC_MSG_RESULT(yes)
  137. GL_LIBS="${GL_LIBS} -framework OpenGL"
  138. CXXFLAGS="${CXXFLAGS} -ObjC++"],
  139. [AC_MSG_RESULT(no)])
  140. LIBS="$LIBS_save"
  141. fi
  142. dnl Use the Raspberry Pi libraries?
  143. if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
  144. AC_CHECK_HEADERS(bcm_host.h,
  145. [AC_CHECK_LIB(vcos, main,
  146. [ac_cv_my_have_gl="yes"
  147. ac_cv_my_stop_looking_for_gl="yes"
  148. AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
  149. dnl FIXME: -lEGL does not belong here but the configure test fails
  150. dnl when cross-compiling, so we add it manually here.
  151. GL_LIBS="${GL_LIBS} -lGLESv2 -lEGL -lvcos -lvchiq_arm -lbcm_host"])])
  152. fi
  153. dnl Use the PS3 PSGL?
  154. if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
  155. AC_CHECK_HEADERS(PSGL/psgl.h,
  156. [ac_cv_my_have_gl="yes"
  157. ac_cv_my_stop_looking_for_gl="yes"])
  158. fi
  159. if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
  160. PKG_CHECK_MODULES(GLES2, glesv2,
  161. [ac_cv_my_have_gl="yes"
  162. AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
  163. GL_CFLAGS="${GL_CFLAGS} ${GLES2_CFLAGS}"
  164. GL_LIBS="${GL_LIBS} ${GLES2_LIBS}"],
  165. [:])
  166. fi
  167. if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
  168. AC_CHECK_HEADER(GLES2/gl2.h,
  169. [ac_cv_my_have_gl="yes"
  170. AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
  171. AC_CHECK_LIB(GLESv2, glEnable,
  172. [GL_LIBS="${GL_LIBS} -lGLESv2"])])
  173. fi
  174. if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
  175. PKG_CHECK_MODULES(GL, gl,
  176. [ac_cv_my_have_gl="yes"
  177. AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available)],
  178. [:])
  179. fi
  180. if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
  181. AC_CHECK_LIB(GL, glEnable,
  182. [ac_cv_my_have_gl="yes"
  183. AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hackish
  184. GL_LIBS="-lGL"])
  185. fi
  186. if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
  187. AC_CHECK_HEADER(GL/gl.h,
  188. [LIBS_save="$LIBS"
  189. LIBS="$LIBS -lopengl32"
  190. AC_MSG_CHECKING(for glLoadIdentity in -lopengl32)
  191. AC_TRY_LINK([#include <GL/gl.h>],
  192. [glLoadIdentity();],
  193. [ac_cv_my_have_gl="yes"
  194. AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hack
  195. AC_MSG_RESULT(yes)
  196. GL_LIBS="-lopengl32"],
  197. [AC_MSG_RESULT(no)])
  198. LIBS="$LIBS_save"])
  199. fi
  200. if test "${ac_cv_my_have_gl}" = "no"; then
  201. AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]])
  202. fi
  203. dnl Use Glew?
  204. ac_cv_my_have_glew="no"
  205. PKG_CHECK_MODULES(GLEW, glew,
  206. [ac_cv_my_have_glew="yes"
  207. GL_CFLAGS="${GLEW_CFLAGS} ${GL_CFLAGS}"
  208. GL_LIBS="${GLEW_LIBS} ${GL_LIBS}"],
  209. [:])
  210. AC_CHECK_HEADER(glew.h,
  211. [LIBS_save="${LIBS}"
  212. LIBS="${LIBS} -lglew32 ${GL_LIBS}"
  213. AC_MSG_CHECKING(for glewInit in -lglew32)
  214. AC_TRY_LINK(
  215. [#include <glew.h>],
  216. [glewInit();],
  217. [ac_cv_my_have_glew="yes"
  218. GL_LIBS="-lglew32 ${GL_LIBS}"
  219. AC_MSG_RESULT(yes)],
  220. [AC_MSG_RESULT(no)])
  221. LIBS="${LIBS_save}"])
  222. if test "${ac_cv_my_have_glew}" != "no"; then
  223. AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
  224. AC_DEFINE(USE_GLEW, 1, Define to 1 to use libglew)
  225. fi
  226. AM_CONDITIONAL(USE_GLEW, test "${ac_cv_my_have_glew}" != "no")
  227. dnl Poor man's GL feature detection if all else failed.
  228. save_LIBS="${LIBS}"
  229. LIBS="${LIBS} ${GL_LIBS} ${GLES2_LIBS}"
  230. AC_CHECK_FUNCS(glBegin)
  231. LIBS="${save_LIBS}"
  232. dnl Use SDL? (always required on Linux or Win32)
  233. ac_cv_my_have_sdl="no"
  234. ac_cv_my_have_sdl_image="no"
  235. ac_cv_my_have_sdl_mixer="no"
  236. dnl
  237. dnl First, try the proper pkg-config check
  238. PKG_CHECK_MODULES(SDL, sdl, [ac_cv_my_have_sdl="yes"], [:])
  239. PKG_CHECK_MODULES(SDLMIXER, SDL_mixer, [ac_cv_my_have_sdl_mixer="yes"], [:])
  240. PKG_CHECK_MODULES(SDLIMAGE, SDL_image, [ac_cv_my_have_sdl_image="yes"], [:])
  241. dnl
  242. dnl Then the old sdl-config method
  243. if test "x${cross_compiling}" != xyes -a "${ac_cv_my_have_sdl}" != yes; then
  244. AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
  245. if test "${SDL_CONFIG}" != "no"; then
  246. SDL_CFLAGS="${SDL_CFLAGS} `${SDL_CONFIG} --cflags`"
  247. SDL_LIBS="${SDL_LIBS} `${SDL_CONFIG} --libs`"
  248. ac_cv_my_have_sdl="yes"
  249. fi
  250. fi
  251. dnl
  252. dnl Maybe all this has failed, try direct inclusion
  253. save_CPPFLAGS="${CPPFLAGS}"
  254. save_LIBS="${LIBS}"
  255. CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
  256. LIBS="${LIBS} ${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
  257. AC_CHECK_HEADERS(SDL.h SDL/SDL.h, [ac_cv_my_have_sdl="yes"])
  258. AC_CHECK_HEADERS(SDL_mixer.h SDL/SDL_mixer.h, [ac_cv_my_have_sdl_mixer="yes"])
  259. AC_CHECK_HEADERS(SDL_image.h SDL/SDL_image.h, [ac_cv_my_have_sdl_image="yes"])
  260. AC_CHECK_LIB(SDL, main,
  261. [SDL_LIBS="${SDL_LIBS} -lSDL"],
  262. [ac_cv_my_have_sdl="no"])
  263. AC_CHECK_LIB(SDLmain, main,
  264. [SDL_LIBS="${SDL_LIBS} -lSDLmain -lSDL"])
  265. AC_CHECK_LIB(SDL_mixer, main,
  266. [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"],
  267. [ac_cv_my_have_sdl_mixer="no"])
  268. AC_CHECK_LIB(SDL_image, main,
  269. [SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"],
  270. [ac_cv_my_have_sdl_image="no"])
  271. SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
  272. SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
  273. CPPFLAGS="${save_CPPFLAGS}"
  274. LIBS="${save_LIBS}"
  275. if test "${ac_cv_my_have_sdl}" = "no"; then
  276. AC_MSG_WARN([SDL not found])
  277. else
  278. AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL)
  279. fi
  280. if test "${ac_cv_my_have_sdl_mixer}" = "no"; then
  281. AC_MSG_WARN([SDL_mixer not found])
  282. else
  283. AC_DEFINE(USE_SDL_MIXER, 1, Define to 1 to use SDL_mixer)
  284. fi
  285. if test "${ac_cv_my_have_sdl_image}" = "no"; then
  286. AC_MSG_WARN([SDL_image not found])
  287. else
  288. AC_DEFINE(USE_SDL_IMAGE, 1, Define to 1 to use SDL_image)
  289. fi
  290. AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
  291. AM_CONDITIONAL(USE_SDL_MIXER, test "${ac_cv_my_have_sdl_mixer}" = "yes")
  292. AM_CONDITIONAL(USE_SDL_IMAGE, test "${ac_cv_my_have_sdl_image}" = "yes")
  293. dnl Use Flex's FlexLexer.h or ours?
  294. ac_cv_my_have_flexlexer_h="no"
  295. AC_LANG_PUSH(C++)
  296. AC_CHECK_HEADERS(FlexLexer.h, [ac_cv_my_have_flexlexer_h="yes"])
  297. AC_LANG_POP(C++)
  298. if test "x${ac_cv_my_have_flexlexer_h}" = "xno"; then
  299. LOL_CFLAGS="$LOL_CFLAGS -I\$(top_srcdir)/contrib/flex-2.5.35/include"
  300. fi
  301. dnl Use NativeClient?
  302. ac_cv_my_have_nacl="no"
  303. AC_LANG_PUSH(C++)
  304. AC_CHECK_HEADERS(ppapi/cpp/instance.h,
  305. [ac_cv_my_have_nacl="yes"
  306. dnl Disable this warning, it's too verbose with vector.h
  307. CXXFLAGS="${CXXFLAGS} -Wno-sign-compare"])
  308. AC_LANG_POP(C++)
  309. AM_CONDITIONAL(USE_NACL, test "${ac_cv_my_have_nacl}" != "no")
  310. dnl Use Android? FIXME: super hacks!
  311. ac_cv_my_have_android="no"
  312. AC_CHECK_LIB(log, __android_log_vprint,
  313. [ac_cv_my_have_android="yes"
  314. LOL_LIBS="${LOL_LIBS} -llog -module"])
  315. AM_CONDITIONAL(USE_ANDROID, test "${ac_cv_my_have_android}" != "no")
  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. dnl Use libpng? (replacement for SDL_image)
  337. ac_cv_my_have_libpng="no"
  338. PKG_CHECK_MODULES(LIBPNG, libpng, [ac_cv_my_have_libpng="yes"], [:])
  339. if test "${ac_cv_my_have_libpng}" != "no"; then
  340. AC_DEFINE(USE_LIBPNG, 1, Define to 1 to use libpng)
  341. fi
  342. AM_CONDITIONAL(USE_LIBPNG, test "${ac_cv_my_have_libpng}" != "no")
  343. dnl Use Windows GDI+?
  344. ac_cv_my_have_gdiplus="no"
  345. AC_LANG_PUSH(C++)
  346. AC_CHECK_HEADERS(gdiplus.h,
  347. [ac_cv_my_have_gdiplus="yes"
  348. LOL_LIBS="${LOL_LIBS} -lgdiplus"],
  349. [ac_cv_my_have_gdiplus="no"],
  350. [#include <algorithm>
  351. using std::min;
  352. using std::max;
  353. #include <windows.h>])
  354. AC_LANG_POP(C++)
  355. if test "${ac_cv_my_have_gdiplus}" != "no"; then
  356. AC_DEFINE(USE_GDIPLUS, 1, Define to 1 to use GDI+)
  357. fi
  358. AM_CONDITIONAL(USE_GDIPLUS, test "${ac_cv_my_have_gdiplus}" = "yes")
  359. dnl Use libcaca? (required for font generation)
  360. ac_cv_my_have_caca="no"
  361. PKG_CHECK_MODULES(CACA, caca >= 0.99.beta17, [ac_cv_my_have_caca="yes"], [:])
  362. if test "${ac_cv_my_have_caca}" != "no"; then
  363. AC_DEFINE(USE_CACA, 1, Define to 1 to use libcaca)
  364. fi
  365. AM_CONDITIONAL(USE_CACA, test "${ac_cv_my_have_caca}" != "no")
  366. dnl Use libpipi? (required for video recording)
  367. ac_cv_my_have_pipi="no"
  368. PKG_CHECK_MODULES(PIPI, pipi, [ac_cv_my_have_pipi="yes"], [:])
  369. if test "${ac_cv_my_have_pipi}" != "no"; then
  370. AC_DEFINE(USE_PIPI, 1, Define to 1 to use libpipi)
  371. fi
  372. AM_CONDITIONAL(USE_PIPI, test "${ac_cv_my_have_pipi}" != "no")
  373. dnl Use GTK+? (required for the deushax editor)
  374. ac_cv_my_have_gtkgl="no"
  375. PKG_CHECK_MODULES(GTK, gtk+-2.0, [ac_cv_my_have_gtkgl="yes"], [:])
  376. PKG_CHECK_MODULES(GTKGL, gtkgl-2.0, [:], [ac_cv_my_have_gtkgl="no"])
  377. if test "${ac_cv_my_have_gtkgl}" != "no"; then
  378. AC_DEFINE(USE_GTKGL, 1, Define to 1 to use GtkGl)
  379. fi
  380. AM_CONDITIONAL(USE_GTKGL, test "${ac_cv_my_have_gtkgl}" != "no")
  381. dnl Can we build neercs?
  382. AM_CONDITIONAL(BUILD_NEERCS, test "${ac_cv_my_have_caca}" != "no" -a "${ac_cv_header_glob_h}" = "yes")
  383. dnl Extra libraries we may need
  384. AC_SUBST(MATH_LIBS)
  385. AC_SUBST(PAM_LIBS)
  386. AC_SUBST(UTIL_LIBS)
  387. dnl How to use the Lol Engine inside this tree
  388. LOL_CFLAGS="$LOL_CFLAGS -I \$(top_srcdir)/src"
  389. LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $GL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS"
  390. LOL_LIBS="$LOL_LIBS $SDL_LIBS $GL_LIBS $EGL_LIBS $LIBPNG_LIBS $D3D_LIBS"
  391. AC_SUBST(LOL_CFLAGS)
  392. AC_SUBST(LOL_LIBS)
  393. AC_CONFIG_FILES(
  394. [Makefile
  395. src/Makefile
  396. src/data/Makefile
  397. src/data/font/Makefile
  398. tutorial/Makefile
  399. test/Makefile
  400. test/math/Makefile
  401. test/sandbox/Makefile
  402. test/xolotl/Makefile
  403. build/Makefile
  404. binaries/Makefile
  405. people/Makefile
  406. games/Makefile
  407. tools/Makefile
  408. ])
  409. AC_CONFIG_FILES(
  410. [games/monsterz/Makefile
  411. ])
  412. AC_CONFIG_FILES(
  413. [games/deushax/Makefile
  414. games/deushax/art/Makefile
  415. games/deushax/art/test/Makefile
  416. games/deushax/gfx/Makefile
  417. games/deushax/maps/Makefile
  418. ])
  419. AC_CONFIG_FILES(
  420. [games/mrpigeon/Makefile
  421. ])
  422. AC_CONFIG_FILES(
  423. [games/orbital/Makefile
  424. ])
  425. AC_CONFIG_FILES(
  426. [tools/neercs/Makefile
  427. ])
  428. AC_CONFIG_FILES(
  429. [people/jnat/Makefile
  430. people/peeweek/Makefile
  431. people/touky/Makefile
  432. ])
  433. AC_OUTPUT