1 |
|
dnl Process this file with autoconf to produce a configure script. |
2 |
|
|
3 |
< |
AC_INIT(Frodo, 4.2) |
3 |
> |
AC_INIT([Frodo], [4.2]) |
4 |
|
AC_CONFIG_SRCDIR(main.cpp) |
5 |
|
AC_PREREQ(2.52) |
6 |
|
AC_CONFIG_HEADER(sysconfig.h) |
13 |
|
AC_PROG_INSTALL |
14 |
|
PKG_PROG_PKG_CONFIG |
15 |
|
|
16 |
+ |
dnl Configure options. |
17 |
+ |
AC_ARG_ENABLE(opengl, [ --enable-opengl use SDL/OpenGL for rendering [default=yes]], , enable_opengl=yes) |
18 |
+ |
|
19 |
|
dnl -fomit-frame-pointer makes things faster |
20 |
|
if [[ x"$GXX" = "xyes" ]]; then |
21 |
|
CFLAGS="$CFLAGS -fomit-frame-pointer -fno-exceptions" |
106 |
|
TARGET=sdl |
107 |
|
CFLAGS="$CFLAGS $SDL_CFLAGS -DHAVE_SDL" |
108 |
|
LIBS="$LIBS $SDL_LIBS" |
109 |
+ |
if [[ "x$enable_opengl" = "xyes" ]]; then |
110 |
+ |
AC_MSG_CHECKING(for OpenGL support) |
111 |
+ |
have_opengl=no |
112 |
+ |
AC_TRY_COMPILE([ |
113 |
+ |
#include <GL/glew.h> |
114 |
+ |
],[ |
115 |
+ |
],[ |
116 |
+ |
have_opengl=yes |
117 |
+ |
]) |
118 |
+ |
AC_MSG_RESULT($have_opengl) |
119 |
+ |
if test x$have_opengl = xyes; then |
120 |
+ |
AC_DEFINE(ENABLE_OPENGL, 1, [OpenGL support is enabled]) |
121 |
+ |
LIBS="$LIBS -lGLEW" |
122 |
+ |
else |
123 |
+ |
AC_MSG_WARN([Could not find OpenGL, ignoring --enable-opengl.]) |
124 |
+ |
fi |
125 |
+ |
fi |
126 |
|
else |
127 |
|
AC_MSG_RESULT([X Window System]) |
128 |
|
TARGET=x11 |