Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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