Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

562 rader
17 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. 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. dnl C++11 and later mode. Checked early so that we don't run into surprises.
  29. version_flag=''
  30. LOL_TRY_CXXFLAGS(-std=c++0x, [version_flag='-std=c++0x'])
  31. LOL_TRY_CXXFLAGS(-std=c++11, [version_flag='-std=c++11'])
  32. LOL_TRY_CXXFLAGS(-std=c++14, [version_flag='-std=c++14'])
  33. LOL_TRY_CXXFLAGS(-std=c++17, [version_flag='-std=c++17'])
  34. AM_CXXFLAGS="${AM_CXXFLAGS} ${version_flag}"
  35. CXXFLAGS="${CXXFLAGS} ${version_flag}"
  36. AC_LANG_PUSH(C++)
  37. AC_MSG_CHECKING(for C++11 enum class support)
  38. AC_TRY_LINK([], [enum class Foo : int { Bar, Baz };],
  39. [AC_MSG_RESULT(yes)],
  40. [AC_MSG_RESULT(no)
  41. AC_MSG_ERROR([[C++ compiler does not support C++11 enum classes]])])
  42. AC_LANG_POP(C++)
  43. AC_LIBTOOL_WIN32_DLL
  44. AM_PROG_LIBTOOL
  45. AC_LIBTOOL_CXX
  46. AC_C_CONST
  47. AC_C_INLINE
  48. dnl Ensure an error is thrown if pkg-config M4 files are not found.
  49. m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
  50. m4_pattern_forbid([^PKG_CHECK_MODULES$])
  51. m4_pattern_forbid([^PKG_PROG_PKG_CONFIG$])
  52. dnl Same for Lol Engine M4 files.
  53. m4_pattern_forbid([^LOL_])
  54. dnl Do not use PKG_CONFIG_LIBDIR when cross-compiling.
  55. if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then
  56. export PKG_CONFIG_LIBDIR=/dev/null
  57. fi
  58. dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
  59. dnl now otherwise it might be set in an obscure if statement. Same thing for
  60. dnl PKG_PROG_PKG_CONFIG which needs to be called first.
  61. AC_EGREP_CPP(yes, foo)
  62. PKG_PROG_PKG_CONFIG()
  63. dnl Check for a working implementation of sed
  64. AC_PROG_SED
  65. AC_MSG_CHECKING(for a sed that understands \t)
  66. if test "$(echo 'x\x' | "${SED}" 's/.*@<:@^x\t@:>@//')" != x; then
  67. AC_MSG_RESULT(no)
  68. AC_MSG_ERROR([[consider installing GNU sed]])
  69. else
  70. AC_MSG_RESULT(yes)
  71. fi
  72. dnl conditional builds
  73. AC_ARG_ENABLE(debug,
  74. [ --enable-debug build debug versions of the game (default no)])
  75. AC_ARG_ENABLE(release,
  76. [ --enable-release build final release of the game (default no)])
  77. AC_ARG_ENABLE(experimental,
  78. [ --enable-experimental experimental build (default no)])
  79. AC_ARG_ENABLE(doc,
  80. [ --enable-doc build documentation (needs doxygen and LaTeX)])
  81. dnl Common C headers
  82. AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h math.h)
  83. AC_CHECK_HEADERS(fastmath.h libutil.h util.h pty.h glob.h unistd.h io.h)
  84. AC_CHECK_HEADERS(execinfo.h)
  85. AC_CHECK_HEADERS(sys/ioctl.h sys/ptrace.h sys/stat.h sys/syscall.h sys/user.h)
  86. AC_CHECK_HEADERS(sys/wait.h sys/time.h sys/types.h)
  87. AC_CHECK_HEADERS(linux/kdev_t.h linux/major.h)
  88. AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h)
  89. AC_CHECK_HEADERS(pam/pam_appl.h pam/pam_misc.h)
  90. dnl Common C++ headers
  91. AC_LANG_PUSH(C++)
  92. AC_CHECK_HEADERS(cxxabi.h)
  93. AC_LANG_POP(C++)
  94. dnl Common C functions
  95. AC_CHECK_FUNCS(getenv system tmpfile tmpnam getcwd _getcwd getlogin)
  96. AC_CHECK_FUNCS(backtrace_symbols)
  97. AC_CHECK_FUNCS(gettimeofday usleep)
  98. dnl Build mode
  99. ac_cv_my_build_mode="devel"
  100. if test "x${enable_release}" = "xyes"; then
  101. ac_cv_my_build_mode="release"
  102. fi
  103. if test "x${enable_devel}" = "xyes"; then
  104. ac_cv_my_build_mode="devel"
  105. fi
  106. if test "x${enable_debug}" = "xyes"; then
  107. ac_cv_my_build_mode="debug"
  108. fi
  109. if test "x${ac_cv_my_build_mode}" = "xdebug"; then
  110. AC_DEFINE(LOL_BUILD_DEBUG, 1, Define to 1 to activate debug build)
  111. LOL_TRY_CXXFLAGS(-O, [AM_CXXFLAGS="${AM_CXXFLAGS} -O"])
  112. LOL_TRY_CXXFLAGS(-g, [AM_CXXFLAGS="${AM_CXXFLAGS} -g"])
  113. elif test "x${ac_cv_my_build_mode}" = "xdevel"; then
  114. AC_DEFINE(LOL_BUILD_DEVEL, 1, Define to 1 to activate development build)
  115. LOL_TRY_CXXFLAGS(-Os, [AM_CXXFLAGS="${AM_CXXFLAGS} -Os"])
  116. LOL_TRY_CXXFLAGS(-g, [AM_CXXFLAGS="${AM_CXXFLAGS} -g"])
  117. LOL_TRY_CXXFLAGS(-ffast-math, [AM_CXXFLAGS="${AM_CXXFLAGS} -ffast-math"])
  118. else
  119. AC_DEFINE(LOL_BUILD_RELEASE, 1, Define to 1 to activate final release)
  120. LOL_TRY_CXXFLAGS(-Os, [AM_CXXFLAGS="${AM_CXXFLAGS} -Os"])
  121. LOL_TRY_CXXFLAGS(-ffast-math, [AM_CXXFLAGS="${AM_CXXFLAGS} -ffast-math"])
  122. LOL_TRY_CXXFLAGS(-fomit-frame-pointer, [AM_CXXFLAGS="${AM_CXXFLAGS} -fomit-frame-pointer"])
  123. LOL_TRY_CXXFLAGS(-fno-strength-reduce, [AM_CXXFLAGS="${AM_CXXFLAGS} -fno-strength-reduce"])
  124. fi
  125. dnl Build documentation?
  126. DOXYGEN="no"
  127. LATEX="no"
  128. if test "${enable_doc}" != "no"; then
  129. AC_PATH_PROG(DOXYGEN, doxygen, no)
  130. if test "${DOXYGEN}" != "no"; then
  131. # Build LaTeX documentation?
  132. AC_PATH_PROG(LATEX, pdflatex, no)
  133. AC_PATH_PROG(KPSEWHICH, kpsewhich, no)
  134. AC_PATH_PROG(DVIPS, dvips, no)
  135. if test "${DVIPS}" = "no" -o "${KPSEWHICH}" = "no"; then
  136. LATEX="no"
  137. fi
  138. if test "${LATEX}" != "no"; then
  139. AC_MSG_CHECKING(for a4.sty and a4wide.sty)
  140. if "${KPSEWHICH}" a4.sty >/dev/null 2>&1; then
  141. if "${KPSEWHICH}" a4wide.sty >/dev/null 2>&1; then
  142. AC_MSG_RESULT(yes)
  143. else
  144. LATEX="no"
  145. AC_MSG_RESULT(no)
  146. fi
  147. else
  148. LATEX="no"
  149. AC_MSG_RESULT(no)
  150. fi
  151. fi
  152. AC_PATH_PROG(DOT, dot, no)
  153. if test "${DOT}" != "no"; then
  154. USE_DOT="YES"
  155. else
  156. USE_DOT="NO"
  157. fi
  158. fi
  159. fi
  160. dnl XXX: disable LaTeX because we use too much memory
  161. LATEX=no
  162. AM_CONDITIONAL(BUILD_DOCUMENTATION, test "${DOXYGEN}" != "no")
  163. AM_CONDITIONAL(USE_LATEX, test "${LATEX}" != "no")
  164. AM_CONDITIONAL(USE_DOT, test "${DOT}" != "no")
  165. dnl Debug symbols
  166. LOL_TRY_LDFLAGS(-rdynamic, [AM_LDFLAGS="${AM_LDFLAGS} -rdynamic"])
  167. dnl Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  168. LOL_TRY_CXXFLAGS(-Wall, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wall"])
  169. LOL_TRY_CXXFLAGS(-Wextra, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wextra"])
  170. LOL_TRY_CXXFLAGS(-Wpointer-arith, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wpointer-arith"])
  171. LOL_TRY_CXXFLAGS(-Wcast-align, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wcast-align"])
  172. LOL_TRY_CXXFLAGS(-Wcast-qual, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wcast-qual"])
  173. LOL_TRY_CXXFLAGS(-Wshadow, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wshadow"])
  174. LOL_TRY_CXXFLAGS(-Wsign-compare, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wsign-compare"])
  175. LOL_TRY_CXXFLAGS(-Wstrict-overflow=1, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wstrict-overflow=1"])
  176. dnl Add these even though they're implicitly set, so that we can safely
  177. dnl remove them from within a Makefile.
  178. LOL_TRY_CXXFLAGS(-Wmaybe-uninitialized, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wmaybe-uninitialized"])
  179. LOL_TRY_CXXFLAGS(-Wnarrowing, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wnarrowing"])
  180. LOL_TRY_CXXFLAGS(-Wunused, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wunused"])
  181. LOL_TRY_CXXFLAGS(-Wstrict-aliasing, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wstrict-aliasing"])
  182. LOL_TRY_CXXFLAGS(-Wparentheses, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wparentheses"])
  183. LOL_TRY_CXXFLAGS(-Wreorder, [AM_CXXFLAGS="${AM_CXXFLAGS} -Wreorder"])
  184. dnl Disable these warnings because they're annoyingly verbose
  185. LOL_TRY_CXXFLAGS(-Wno-psabi, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wno-psabi"])
  186. AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
  187. AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
  188. dnl Unix-specific libutil
  189. AC_CHECK_LIB(util, forkpty,
  190. [UTIL_LIBS="${UTIL_LIBS} -lutil"
  191. dnl Override future forkpty detection
  192. ac_cv_func_forkpty="yes"])
  193. AC_CHECK_FUNCS(forkpty)
  194. dnl GCC-specific symbol demangling
  195. AC_LANG_PUSH(C++)
  196. AC_TRY_LINK(
  197. [#include <cxxabi.h>],
  198. [abi::__cxa_demangle(NULL, 0, 0, NULL);],
  199. [AC_DEFINE(HAVE_CXA_DEMANGLE, 1, Define to 1 if abi::__cxa_demangle is available)])
  200. AC_LANG_POP(C++)
  201. dnl Are we building using MinGW?
  202. LOL_TRY_CXXFLAGS(-mwindows -mwin32,
  203. [AM_CXXFLAGS="${AM_CXXFLAGS} -mwindows -mwin32"
  204. LOL_LIBS="${LOL_LIBS} -uWinMain -u_WinMain@16"])
  205. dnl Are we building using Emscripten?
  206. ac_cv_my_have_emscripten="no"
  207. AC_CHECK_HEADERS(emscripten.h,
  208. [ac_cv_my_have_emscripten="yes"
  209. dnl XXX: activate this if memory heap is too small
  210. #AM_CXXFLAGS="${AM_CXXFLAGS} -s ALLOW_MEMORY_GROWTH=1"
  211. dnl HACK: until emcc properly adds these to EMSDK_OPTS
  212. CPPFLAGS="${CPPFLAGS} -U__i386__ -U__x86_64__ -U__i386 -U__x86_64 -Ui386 -Ux86_64"
  213. CPPFLAGS="${CPPFLAGS} -U__SSE__ -U__SSE2__ -U__MMX__ -UX87_DOUBLE_ROUNDING"
  214. CPPFLAGS="${CPPFLAGS} -UHAVE_GCC_ASM_FOR_X87 -DEMSCRIPTEN -U__STRICT_ANSI__"
  215. CPPFLAGS="${CPPFLAGS} -U__CYGWIN__"])
  216. AM_CONDITIONAL(USE_EMSCRIPTEN, test "${ac_cv_my_have_emscripten}" != "no")
  217. dnl Are we on the Xbox 360?
  218. dnl Answer: NO! we don't know how to build for it anyway
  219. AM_CONDITIONAL(USE_X360, false)
  220. dnl Are we on an OS X or iOS platform?
  221. LOL_TRY_LDFLAGS(-framework Foundation,
  222. [LOL_LIBS="${LOL_LIBS} -framework Foundation"])
  223. LOL_TRY_LDFLAGS(-framework CoreGraphics,
  224. [LOL_LIBS="${LOL_LIBS} -framework CoreGraphics"])
  225. LOL_TRY_LDFLAGS(-framework CoreData,
  226. [LOL_LIBS="${LOL_LIBS} -framework CoreData"])
  227. LOL_TRY_LDFLAGS(-framework UIKit,
  228. [LOL_LIBS="${LOL_LIBS} -framework UIKit"])
  229. dnl Are we on a Direct3D 9 platform?
  230. #ac_cv_my_have_d3d9="no"
  231. #AC_CHECK_HEADERS(d3d9.h, [ac_cv_my_have_d3d9="yes"])
  232. #if test "${ac_cv_my_have_d3d9}" != "no"; then
  233. # D3D_LIBS="${D3D_LIBS} -ld3d9 -ld3dx9 -lxinput"
  234. # AC_DEFINE(USE_D3D9, 1, Define to 1 to use DirectX 9)
  235. #fi
  236. #AM_CONDITIONAL(USE_D3D9, test "${ac_cv_my_have_d3d9}" != "no")
  237. LOL_CHECK_OPENGL
  238. LOL_CHECK_SDL
  239. dnl Use mingw threads if necessary
  240. if true; then
  241. LOL_CFLAGS="$LOL_CFLAGS -I\$(top_srcdir)/external/mingw-std-threads-0.0.ac5c9e3b/include/"
  242. fi
  243. dnl Use pegtl? Yes, always
  244. if true; then
  245. LOL_CFLAGS="$LOL_CFLAGS -I\$(top_srcdir)/external/pegtl-1.3.1-e7752e81/include"
  246. fi
  247. dnl Use Imgui? Yes, always
  248. if true; then
  249. LOL_CFLAGS="$LOL_CFLAGS -I\$(top_srcdir)/external/imgui"
  250. fi
  251. dnl Use NativeClient?
  252. ac_cv_my_have_nacl="no"
  253. AC_LANG_PUSH(C++)
  254. AC_CHECK_HEADERS(ppapi/cpp/instance.h,
  255. [ac_cv_my_have_nacl="yes"
  256. LOL_LIBS="${LOL_LIBS} -lnosys"
  257. if test "${ac_cv_my_build_mode}" = "xrelease"; then
  258. LOL_TRY_CXXFLAGS(-s, [AM_CXXFLAGS="${AM_CXXFLAGS} -s"])
  259. fi])
  260. AC_LANG_POP(C++)
  261. AM_CONDITIONAL(USE_NACL, test "${ac_cv_my_have_nacl}" != "no")
  262. dnl Use Android? FIXME: super hacks!
  263. ac_cv_my_have_android="no"
  264. AC_CHECK_LIB(log, __android_log_vprint,
  265. [ac_cv_my_have_android="yes"
  266. LOL_LIBS="${LOL_LIBS} -llog -landroid -module -lEGL -lGLESv2"])
  267. AM_CONDITIONAL(USE_ANDROID, test "${ac_cv_my_have_android}" != "no")
  268. dnl Use EGL?
  269. ac_cv_my_have_egl="no"
  270. PKG_CHECK_MODULES(EGL, egl, [ac_cv_my_have_egl="yes"], [:])
  271. if test "${ac_cv_my_have_egl}" != "no"; then
  272. AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl)
  273. EGL_LIBS="${EGL_LIBS} -lX11"
  274. fi
  275. AC_CHECK_LIB(EGL, main,
  276. [ac_cv_my_have_egl="yes"
  277. AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl)
  278. EGL_LIBS="-lEGL"])
  279. dnl Raspberry Pi is different, check for it with extra libs; also we
  280. dnl look for a different function to bypass autoconf caching
  281. AC_CHECK_LIB(EGL, eglGetDisplay,
  282. [ac_cv_my_have_egl="yes"
  283. AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl)
  284. EGL_LIBS="-lEGL -lvcos -lvchiq_arm -lbcm_host -lGLESv2"],
  285. [:],
  286. [-lvcos -lvchiq_arm -lbcm_host -lGLESv2])
  287. AM_CONDITIONAL(USE_EGL, test "${ac_cv_my_have_egl}" != "no")
  288. dnl Use libpng? (replacement for SDL_image)
  289. ac_cv_my_have_libpng="no"
  290. PKG_CHECK_MODULES(LIBPNG, libpng, [ac_cv_my_have_libpng="yes"], [:])
  291. if test "${ac_cv_my_have_libpng}" != "no"; then
  292. AC_DEFINE(USE_LIBPNG, 1, Define to 1 to use libpng)
  293. fi
  294. AM_CONDITIONAL(USE_LIBPNG, test "${ac_cv_my_have_libpng}" != "no")
  295. dnl Use Windows GDI+?
  296. ac_cv_my_have_gdiplus="no"
  297. AC_LANG_PUSH(C++)
  298. AC_CHECK_HEADERS(gdiplus.h,
  299. [ac_cv_my_have_gdiplus="yes"
  300. LOL_LIBS="${LOL_LIBS} -lgdiplus"],
  301. [ac_cv_my_have_gdiplus="no"],
  302. [#include <algorithm>
  303. using std::min;
  304. using std::max;
  305. #include <windows.h>])
  306. AC_LANG_POP(C++)
  307. if test "${ac_cv_my_have_gdiplus}" != "no"; then
  308. AC_DEFINE(USE_GDIPLUS, 1, Define to 1 to use GDI+)
  309. fi
  310. AM_CONDITIONAL(USE_GDIPLUS, test "${ac_cv_my_have_gdiplus}" = "yes")
  311. dnl Use libcaca? (required for font generation)
  312. ac_cv_my_have_caca="no"
  313. PKG_CHECK_MODULES(CACA, caca >= 0.99.beta17, [ac_cv_my_have_caca="yes"], [:])
  314. if test "${ac_cv_my_have_caca}" != "no"; then
  315. AC_DEFINE(USE_CACA, 1, Define to 1 to use libcaca)
  316. fi
  317. AM_CONDITIONAL(USE_CACA, test "${ac_cv_my_have_caca}" != "no")
  318. # Use Imlib2?
  319. ac_cv_my_have_imlib2="no"
  320. PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"], [:])
  321. if test "${ac_cv_my_have_imlib2}" != "no"; then
  322. AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2)
  323. LOL_CFLAGS="${LOL_CFLAGS} ${IMLIB2_CFLAGS}"
  324. LOL_LIBS="${LOL_LIBS} ${IMLIB2_LIBS}"
  325. fi
  326. AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
  327. # Use libavcodec? (required for movie encoding)
  328. ac_cv_my_have_ffmpeg="yes"
  329. PKG_CHECK_MODULES([LIBAVCODEC], [libavcodec], [:], [ac_cv_my_have_ffmpeg=no])
  330. PKG_CHECK_MODULES([LIBAVFORMAT], [libavformat], [:], [ac_cv_my_have_ffmpeg=no])
  331. PKG_CHECK_MODULES([LIBSWSCALE], [libswscale], [:], [ac_cv_my_have_ffmpeg=no])
  332. if test "${ac_cv_my_have_ffmpeg}" = "no"; then
  333. ac_cv_my_have_ffmpeg="yes"
  334. AC_CHECK_HEADERS(libavcodec/avcodec.h, [:], [ac_cv_my_have_ffmpeg=no])
  335. AC_CHECK_HEADERS(libavformat/avformat.h, [:], [ac_cv_my_have_ffmpeg=no])
  336. AC_CHECK_HEADERS(libswscale/swscale.h, [:], [ac_cv_my_have_ffmpeg=no])
  337. if test "${ac_cv_my_have_ffmpeg}" = "yes"; then
  338. LIBAVFORMAT_LIBS="-lavformat"
  339. LIBAVCODEC_LIBS="-lavcodec -lavutil"
  340. LIBSWSCALE_LIBS="-lswscale -lswresample"
  341. AC_CHECK_LIB(ws2_32, main, LOL_LIBS="${LOL_LIBS} -lws2_32")
  342. fi
  343. fi
  344. if test "${ac_cv_my_have_ffmpeg}" != "no"; then
  345. AC_DEFINE(USE_FFMPEG, 1, Define to 1 to use FFmpeg)
  346. LOL_CFLAGS="${LOL_CFLAGS} ${LIBAVFORMAT_CFLAGS} ${LIBAVCODEC_CFLAGS} ${SWSCALE_CFLAGS}"
  347. LOL_LIBS="${LOL_LIBS} ${LIBAVFORMAT_LIBS} ${LIBAVCODEC_LIBS} ${LIBSWSCALE_LIBS}"
  348. fi
  349. AM_CONDITIONAL(USE_FFMPEG, test "${ac_cv_my_have_ffmpeg}" != "no")
  350. dnl Use GTK+? (required for the deushax editor)
  351. ac_cv_my_have_gtkgl="no"
  352. PKG_CHECK_MODULES(GTK, gtk+-2.0, [ac_cv_my_have_gtkgl="yes"], [:])
  353. PKG_CHECK_MODULES(GTKGL, gtkgl-2.0, [:], [ac_cv_my_have_gtkgl="no"])
  354. if test "${ac_cv_my_have_gtkgl}" != "no"; then
  355. AC_DEFINE(USE_GTKGL, 1, Define to 1 to use GtkGl)
  356. fi
  357. AM_CONDITIONAL(USE_GTKGL, test "${ac_cv_my_have_gtkgl}" != "no")
  358. dnl Can we build neercs?
  359. AM_CONDITIONAL(BUILD_NEERCS, test "${ac_cv_my_have_caca}" != "no")
  360. dnl Should we ship non-free data?
  361. AM_CONDITIONAL(HAVE_NONFREE, true)
  362. dnl Extra libraries we may need
  363. AC_SUBST(MATH_LIBS)
  364. AC_SUBST(PAM_LIBS)
  365. AC_SUBST(UTIL_LIBS)
  366. dnl How to use the Lol Engine outside this tree
  367. LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $GL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS"
  368. LOL_LIBS="$LOL_LIBS $SDL_LIBS $GL_LIBS $EGL_LIBS $LIBPNG_LIBS $D3D_LIBS"
  369. LOL_DEPS="${LOL_DEPS} \$(top_builddir)/src/liblolcore.a"
  370. LOL_DEPS="${LOL_DEPS} \$(top_builddir)/src/bullet/liblolbullet.a"
  371. LOL_DEPS="${LOL_DEPS} \$(top_builddir)/src/lua/liblollua.a"
  372. dnl How to use the Lol Engine inside this tree
  373. AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_srcdir)/src"
  374. AM_CPPFLAGS="${AM_CPPFLAGS} -DLOL_CONFIG_SOURCESUBDIR=\\\"\$(subdir)\\\""
  375. AM_CPPFLAGS="${AM_CPPFLAGS} ${LOL_CFLAGS}"
  376. AM_LDFLAGS="${AM_LDFLAGS} ${LOL_DEPS}"
  377. AM_LDFLAGS="${AM_LDFLAGS} ${LOL_LIBS}"
  378. dnl Extra flags
  379. AC_SUBST(LOL_CFLAGS)
  380. AC_SUBST(LOL_LIBS)
  381. AC_SUBST(LOL_DEPS)
  382. AC_SUBST(AM_CFLAGS)
  383. AC_SUBST(AM_CPPFLAGS)
  384. AC_SUBST(AM_CXXFLAGS)
  385. AC_SUBST(AM_LDFLAGS)
  386. AC_SUBST(USE_DOT)
  387. AC_CONFIG_FILES(
  388. [Makefile
  389. src/Makefile
  390. src/bullet/Makefile
  391. src/lua/Makefile
  392. src/data/Makefile
  393. src/data/font/Makefile
  394. src/t/Makefile
  395. build/Makefile
  396. binaries/Makefile
  397. people/Makefile
  398. games/Makefile
  399. demos/Makefile
  400. tools/Makefile
  401. tools/vimlol/Makefile
  402. tools/vslol/Makefile
  403. doc/Makefile
  404. doc/doxygen.cfg
  405. doc/samples/Makefile
  406. doc/samples/math/Makefile
  407. doc/samples/meshviewer/Makefile
  408. doc/samples/sandbox/Makefile
  409. doc/tutorial/Makefile
  410. ])
  411. AC_CONFIG_FILES(
  412. [games/monsterz/Makefile
  413. games/mrpigeon/Makefile
  414. games/orbital/Makefile
  415. games/singlshot/Makefile
  416. games/thonik/Makefile
  417. games/sot3000/Makefile
  418. games/grunx/Makefile
  419. games/weshgrow/Makefile
  420. games/allturdbeast/Makefile
  421. ])
  422. AC_CONFIG_FILES(
  423. [games/deushax/Makefile
  424. games/deushax/art/Makefile
  425. games/deushax/art/test/Makefile
  426. games/deushax/gfx/Makefile
  427. games/deushax/maps/Makefile
  428. ])
  429. AC_CONFIG_FILES(
  430. [games/abuse/Makefile
  431. games/abuse/src/Makefile
  432. games/abuse/data/Makefile
  433. games/abuse/doc/Makefile
  434. games/abuse/doc/abuse.6
  435. games/abuse/doc/abuse-tool.6
  436. ])
  437. AC_CONFIG_FILES(
  438. [demos/lol.js/Makefile
  439. ])
  440. AC_CONFIG_FILES(
  441. [tools/lolremez/Makefile
  442. tools/lolunit/Makefile
  443. tools/neercs/Makefile
  444. tools/pimp/Makefile
  445. tools/zepto8/Makefile
  446. ])
  447. AC_CONFIG_FILES(
  448. [people/jnat/Makefile
  449. people/jnat/TestProject/Makefile
  450. people/peeweek/Makefile
  451. people/benlitz/Makefile
  452. people/benlitz/test1/Makefile
  453. people/benlitz/voxel/Makefile
  454. people/benlitz/lolui/Makefile
  455. people/touky/Makefile
  456. people/touky/shared/Makefile
  457. people/touky/sprite_sorter/Makefile
  458. people/touky/squad_shooter/Makefile
  459. people/touky/top_shooter/Makefile
  460. people/touky/touky_demo/Makefile
  461. people/touky/tactics/Makefile
  462. people/touky/the_unfortunate_voronoid/Makefile
  463. people/touky/workbench/Makefile
  464. people/jylam/Makefile
  465. people/jylam/private/Makefile
  466. people/jylam/private/chat/Makefile
  467. people/jylam/private/lander/Makefile
  468. people/jylam/private/oric_convert/Makefile
  469. people/sam/Makefile
  470. people/sam/kanagawa/Makefile
  471. people/sam/sapp/Makefile
  472. ])
  473. AC_OUTPUT