| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010–2023 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -29,7 +29,8 @@ CXXFLAGS="${CXXFLAGS} ${version_flag}" | |||
| AC_LANG_PUSH(C++) | |||
| AC_MSG_CHECKING(for C++11 enum class support) | |||
| AC_TRY_LINK([], [enum class Foo : int { Bar, Baz };], | |||
| AC_LINK_IFELSE( | |||
| [AC_LANG_PROGRAM([], [enum class Foo : int { Bar, Baz };])], | |||
| [AC_MSG_RESULT(yes)], | |||
| [AC_MSG_RESULT(no) | |||
| AC_MSG_ERROR([[C++ compiler does not support C++11 enum classes]])]) | |||
| @@ -45,7 +46,8 @@ AC_DEFUN([LOL_AC_CHECK], [ | |||
| dnl Check that the C++ compiler really works | |||
| AC_LANG_PUSH(C++) | |||
| AC_MSG_CHECKING(for a fully working C++ compiler) | |||
| AC_TRY_LINK([], [], | |||
| AC_LINK_IFELSE( | |||
| [AC_LANG_PROGRAM([], [])], | |||
| [AC_MSG_RESULT(yes)], | |||
| [AC_MSG_RESULT(no) | |||
| AC_MSG_ERROR([[C++ compiler cannot link executables]])]) | |||
| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010–2023 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -36,7 +36,8 @@ if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then | |||
| LIBS_save="$LIBS" | |||
| LIBS="$LIBS -Wl,-framework -Wl,OpenGL" | |||
| AC_MSG_CHECKING(for -framework OpenGL) | |||
| AC_TRY_LINK([], [], | |||
| AC_LINK_IFELSE( | |||
| [AC_LANG_PROGRAM([], [])], | |||
| [AC_MSG_RESULT(yes) | |||
| ac_cv_my_have_gl="yes" | |||
| GL_LIBS="${GL_LIBS} -framework OpenGL" | |||
| @@ -50,7 +51,8 @@ if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then | |||
| LIBS_save="$LIBS" | |||
| LIBS="$LIBS -Wl,-framework -Wl,OpenGLES" | |||
| AC_MSG_CHECKING(for -framework OpenGLES) | |||
| AC_TRY_LINK([], [], | |||
| AC_LINK_IFELSE( | |||
| [AC_LANG_PROGRAM([], [])], | |||
| [AC_MSG_RESULT(yes) | |||
| ac_cv_my_have_gl="yes" | |||
| GL_LIBS="${GL_LIBS} -framework OpenGLES" | |||
| @@ -109,8 +111,10 @@ if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then | |||
| [LIBS_save="$LIBS" | |||
| LIBS="$LIBS -lopengl32" | |||
| AC_MSG_CHECKING(for glLoadIdentity in -lopengl32) | |||
| AC_TRY_LINK([#include <GL/gl.h>], | |||
| [glLoadIdentity();], | |||
| AC_LINK_IFELSE( | |||
| [AC_LANG_PROGRAM( | |||
| [#include <GL/gl.h>], | |||
| [glLoadIdentity();])], | |||
| [ac_cv_my_have_gl="yes" | |||
| AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hack | |||
| AC_MSG_RESULT(yes) | |||
| @@ -129,9 +133,10 @@ AC_CHECK_HEADER(GL/glew.h, | |||
| [LIBS_save="${LIBS}" | |||
| LIBS="${LIBS} -lglew32s ${GL_LIBS}" | |||
| AC_MSG_CHECKING(for glewInit in -lglew32s) | |||
| AC_TRY_LINK( | |||
| [#include <GL/glew.h>], | |||
| [glewInit();], | |||
| AC_LINK_IFELSE( | |||
| [AC_LANG_PROGRAM( | |||
| [#include <GL/glew.h>], | |||
| [glewInit();])], | |||
| [ac_cv_my_have_glew="yes" | |||
| GL_LIBS="-lglew32s ${GL_LIBS}" | |||
| AC_MSG_RESULT(yes)], | |||
| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010–2023 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -17,7 +17,7 @@ AC_DEFUN([LOL_TRY_CFLAGS], | |||
| [AC_MSG_CHECKING([if $CC supports $1 flags]) | |||
| save_CFLAGS="$CFLAGS" | |||
| CFLAGS="$1 -Werror" | |||
| AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no]) | |||
| AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no]) | |||
| CFLAGS="$save_CFLAGS" | |||
| AC_MSG_RESULT([$ac_cv_try_cflags_ok]) | |||
| if test x"$ac_cv_try_cflags_ok" = x"yes"; then | |||
| @@ -33,7 +33,7 @@ AC_DEFUN([LOL_TRY_CXXFLAGS], | |||
| AC_LANG_PUSH(C++) | |||
| save_CXXFLAGS="$CXXFLAGS" | |||
| CXXFLAGS="$1 -Werror" | |||
| AC_TRY_COMPILE([],[],[ac_cv_try_cxxflags_ok=yes],[ac_cv_try_cxxflags_ok=no]) | |||
| AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[ac_cv_try_cxxflags_ok=yes],[ac_cv_try_cxxflags_ok=no]) | |||
| CXXFLAGS="$save_CXXFLAGS" | |||
| AC_MSG_RESULT([$ac_cv_try_cxxflags_ok]) | |||
| if test x"$ac_cv_try_cxxflags_ok" = x"yes"; then | |||
| @@ -49,7 +49,7 @@ AC_DEFUN([LOL_TRY_LDFLAGS], | |||
| [AC_MSG_CHECKING([if $CC supports $1 flags]) | |||
| save_LDFLAGS="$LDFLAGS" | |||
| LDFLAGS="$1 -Werror" | |||
| AC_TRY_LINK([],[],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no]) | |||
| AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no]) | |||
| LDFLAGS="$save_LDFLAGS" | |||
| AC_MSG_RESULT([$ac_cv_try_ldflags_ok]) | |||
| if test x"$ac_cv_try_ldflags_ok" = x"yes"; then | |||
| @@ -206,7 +206,7 @@ configure() | |||
| CXXFLAGS="$CXXFLAGS -m64" | |||
| ;; | |||
| web-*) | |||
| # Force cross-compilation because AC_TRY_LINK is going to check | |||
| # Force cross-compilation because AC_LINK_IFELSE is going to check | |||
| # whether our binaries have the executable bit set. | |||
| HOSTFLAGS=--host=none | |||
| BUILDFLAGS=--build=`$top_srcdir/.auto/config.guess` | |||
| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010–2023 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -10,10 +10,10 @@ dnl to Public License, Version 2, as published by the WTFPL Task Force. | |||
| dnl See http://www.wtfpl.net/ for more details. | |||
| dnl | |||
| AC_INIT(lolengine, 0.0) | |||
| AC_PREREQ(2.50) | |||
| AC_INIT([lolengine], [0.0]) | |||
| AC_PREREQ(2.69) | |||
| AC_CONFIG_AUX_DIR(.auto) | |||
| AC_CANONICAL_SYSTEM | |||
| AC_CANONICAL_TARGET | |||
| AM_INIT_AUTOMAKE([subdir-objects no-define tar-ustar silent-rules]) | |||
| dnl AM_MAINTAINER_MODE | |||
| @@ -28,7 +28,6 @@ AM_PROG_CC_C_O | |||
| AC_PROG_CPP | |||
| AC_PROG_CXX | |||
| AC_PROG_CXXCPP | |||
| AC_PROG_RANLIB | |||
| LT_INIT([win32-dll]) | |||
| LT_LANG([C++]) | |||
| @@ -221,9 +220,10 @@ AC_SUBST(LOL_USE_DOT) | |||
| dnl GCC-specific symbol demangling | |||
| AC_LANG_PUSH(C++) | |||
| AC_TRY_LINK( | |||
| [#include <cxxabi.h>], | |||
| [abi::__cxa_demangle(NULL, 0, 0, NULL);], | |||
| AC_LINK_IFELSE( | |||
| [AC_LANG_PROGRAM( | |||
| [#include <cxxabi.h>], | |||
| [abi::__cxa_demangle(NULL, 0, 0, NULL);])], | |||
| [AC_DEFINE(HAVE_CXA_DEMANGLE, 1, Define to 1 if abi::__cxa_demangle is available)]) | |||
| AC_LANG_POP(C++) | |||
| @@ -259,7 +259,7 @@ AM_CONDITIONAL(BUILD_SAMPLES, test "${enable_samples}" != "no" -a "${enable_subp | |||
| LOL_AC_FINI() | |||
| AC_CONFIG_HEADER(config.h) | |||
| AC_CONFIG_HEADERS([config.h]) | |||
| AC_CONFIG_FILES( | |||
| [Makefile | |||